Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Date Time Bundle Laravel Package

mohebifar/date-time-bundle

A Symfony bundle that provides date and time form types with picker integration, making it easier to add date/time inputs and handle DateTime values cleanly in PHP applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — fundamentally mismatched, but salvageable at a fraction of its value. The package is a Symfony2 bundle, not a Laravel package. Three distinct pieces of value exist, and they have very different portability:

  • Calendar-aware formatter (portable, ~the only real asset). The core idea — keep a native DateTime in the domain model and push calendar/display formatting to the presentation edge — is correct and framework-agnostic in principle. This is the seam worth extracting.
  • Datepicker FormType (non-portable, discard). It depends on symfony/form, AbstractType, and FormBuilderInterface. Laravel does not ship Symfony Form, so this half of the package is dead weight. In Laravel, date selection belongs in a Blade component backed by a client-side datepicker, not a server-side form type.
  • Bundle/DI registration (non-portable, discard). Extension, kernel bundle discovery, and compiler passes have no Laravel analogue. Laravel's service provider model is the replacement, not the bridge.

Net: a TPM should frame this as "a ~200-line reference implementation of calendar formatting wrapped in an obsolete framework shell." The architecture concept scores well; the code as a dependency scores poorly.

Integration feasibility — low as a dependency, medium as a source. Adding it to a modern Laravel app means either pulling Symfony Form and legacy Symfony components alongside Laravel (architecturally incoherent, large dependency tree, high conflict probability) or forking and extracting the conversion logic. The extraction path is the only defensible one, and it is a bounded spike — days, not weeks — if the conversion code separates cleanly. That condition is the pivot point for the entire recommendation.

Technical risk — high and compounding. Symfony 2.x is end-of-life (2.8 EOL Nov 2018), which predicts PHP version constraints that predate PHP 8.1 and symfony/* constraints that will conflict with anything a current Laravel app resolves. With 16 stars and 0 dependents there is no community triage, no security response path, and no realistic upstream fix. There is no evidence of a test suite, which matters disproportionately here: leap-year rules, month-length variation, and year-boundary behavior are exactly where calendar code fails, and exactly where untested code is dangerous.

Key questions that gate the decision:

  1. Which calendars are supported, and is the Gregorian↔target conversion implemented in-house or delegated to a maintained library?
  2. What are the composer.json PHP and symfony/* constraints? Do they conflict with the target Laravel version's framework requirements?
  3. Is the conversion logic separable from AbstractType and the DI extension without a rewrite — i.e., are the pure functions actually pure?
  4. Is there a test suite covering leap years, month-length variation, and year boundaries?
  5. Does IntlDateFormatter (or the intl extension) already cover the requirement? If so, the only differentiated component is the widget, which you should build or vendor elsewhere.
  6. License and provenance — is the code original or vendored from another project with different terms?

If the answer to (3) is "entangled," the correct TPM decision is to stop and adopt a maintained, framework-agnostic alternative (e.g. morilog/jalali or hekmatinasser/verta for Jalali) rather than fund a fork.

Integration Approach

Stack fit — no native fit. Laravel expects a service provider, optional facade, config file, Blade directive, validation rule, and Eloquent cast. None exist. The Symfony FormType cannot be surfaced as a Laravel macro without a Form bridge, which is not worth building.

Migration path — mine, don't install. Sequence:

  1. Audit (time-boxed). Separate pure conversion/formatting functions from Symfony-coupled classes. Produce a short written finding: portable / entangled / not worth it.
  2. Extract the conversion into framework-free classes with no Symfony imports.
  3. Wrap in a Laravel service provider exposing a facade, a Blade directive (e.g. @jalali($model->created_at)), a validation rule for user-entered calendar dates, and an Eloquent cast/accessor so storage stays Gregorian and display is calendar-aware.
  4. Replace the Datepicker FormType with a client-side datepicker (flatpickr with a Jalali/Persian plugin) surfaced via a Blade component — this is the correct layer for date entry in Laravel regardless.
  5. Vendor the extracted code into app/Support with attribution and a pinned source commit reference, not as a VCS composer dependency.

Compatibility checks before writing code. Confirm the target Laravel version's PHP floor (Laravel 10/11 → PHP 8.1+). Confirm no symfony/* transitive requirement survives extraction. Confirm the intl and/or calendar PHP extensions are present in the deployment image. Critically: audit whether the package's format tokens shadow PHP's date() tokens while behaving differently — that is a silent-wrong-output bug class and must be documented per-token or renamespaced.

Sequencing — spike first, decide second, build third. Run the audit/extraction as a 1–3 day spike because the go/no-go hinges on how cleanly the math separates. Only after a working extraction should you invest in the Laravel-facing surface (provider, directive, cast, rule). The datepicker replacement is independent and can run in parallel. Do not attempt composer require of the bundle at any point — the resolution risk alone is not worth the cycle, and a silent symfony/* downgrade could break unrelated functionality.

Compare before committing. Price the extraction spike against simply adopting a maintained calendar library. The package is only worth mining if it supports a calendar those libraries do not, or if the audit surfaces conversion code of unusually high quality.

Operational Impact

Maintenance — you own it forever. Upstream is dormant; zero dependents means nobody else is filing or fixing issues. Any fork becomes an internal artifact needing an owner, a test suite, and a documented upgrade path. Budget for this explicitly in the roadmap or the code becomes orphaned tribal knowledge within two release cycles. Treat "we forked it" as a standing maintenance line item, not a one-time cost.

Support — none. No vendor, no active maintainer, no community channel, no security response process. The internal team must be able to read and patch calendar arithmetic. If calendar domain knowledge is concentrated in one engineer, that is a single point of failure and a staffing risk the TPM should name.

Scaling — negligible. Conversion is CPU-trivial and stateless; no throughput, memory, or connection-pool risk. The only operational note: avoid per-row conversion in reports over large collections — format at render time or cache the formatted string on the model. Centralize timezone handling so conversions are deterministic regardless of server locale or job context.

Failure modes to design against:

  • Calendar edge cases — leap-year rules, varying month lengths, year boundaries. Highest-probability defect source; write tests before trusting the extraction.
  • Install-time dependency conflict — attempting to add the bundle can fail resolution or silently downgrade a symfony/* component and break unrelated features. This is why extraction, not installation, is the path.
  • Format-token ambiguity — familiar date()-style tokens with different semantics produce wrong output that passes review. Enforce a distinct token namespace or a typed formatter API.
  • Timezone drift — server-local assumptions yield off-by-one-day errors around midnight and DST transitions. Require an explicit timezone argument.
  • Locale coupling — if output depends on request locale, background jobs and API responses can render differently from web views. Make locale an explicit parameter.
  • Inherited EOL exposure — do not carry Symfony2-era code forward into the extraction; if any dependency chain requires legacy Symfony packages, abandon the extraction.

Ramp-up — asymmetric and mostly front-loaded. The conversion logic is small; a mid-level Laravel developer can own the extracted service in under a week given good tests. The expensive part is understanding Symfony2 idioms (bundle extension, DI compiler passes, FormType hierarchy) — but since the recommendation is to discard them, that cost is confined to the audit. The durable ramp-up risk is domain knowledge: whoever understands the target calendar's rules becomes the bottleneck unless those rules are encoded as executable tests.

Bottom line for the TPM. Do not adopt this as a dependency — dead framework generation, zero dependents, no security path, and a non-portable form layer make it unsuitable. It is worth a short, time-boxed extraction spike only if the audit shows the conversion math separates cleanly and no maintained library covers the same calendar. In most cases the honest recommendation is: cite it as prior art for the localization roadmap, fund a small platform-level date/time formatting component, and ship the datepicker as a shared UI component.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin