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

Datetime Provider Bundle Laravel Package

kdyby/datetime-provider-bundle

A Symfony bundle that integrates kdyby/datetime-provider, giving you DI-managed date/time services so you can inject and control the current time instead of calling new DateTime directly. This makes time-dependent code testable and lets you freeze or mock "now" in your Symfony applications...

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on time abstraction. The core idea — injecting "now" instead of calling new \DateTime() / time() inline — is a genuine architectural decision, not a library decision. This package is one (small, dated) implementation of that pattern for Symfony's DI container. As a PM, the decision it informs is "do we standardize on an injectable clock across services that make time-based decisions?"
  • Testability budget for time-sensitive features. Any roadmap item with temporal logic benefits: trial expiration, subscription renewal and proration, SLA/response-time clocks, scheduled notifications, reporting period boundaries, DST transitions, "X days ago" UI, rate-limit windows. An injectable clock is the difference between deterministic unit tests and flaky integration tests that sleep or mock the system clock globally.
  • Support and CS tooling. A swappable time source enables "time travel" for internal tooling — reproducing what a customer saw at a specific instant, or demonstrating an expiry flow without waiting. That is a support-cost and demo-quality decision, not just an engineering preference.
  • Deprecation/migration scoping. With 6 stars and 0 dependents, the realistic PM decision is triage: if it exists anywhere in the estate, scope migration effort; if it doesn't, close the evaluation as "no action."
  • Licensing risk sign-off. NOASSERTION means the license could not be auto-identified. For a PM this is a procurement/legal gate, not a technical detail — it blocks adoption in any org with license policy until confirmed.
  • Framework lifecycle exposure. The v1.0.2 release widens the supported range to Symfony 5, which reached end-of-life in November 2023. Supporting this package in a new build means pinning to an EOL framework major — a security-patching and compliance question that belongs on the risk register, not in a composer file.

When to Consider This Package

The v1.0.2 release ("Allow Symfony 5") is a one-line composer constraint relaxation and the first release since 2019-12-10. It is not evidence of renewed maintenance: no new capability, no PHP 8 / PSR-20 alignment, no license clarification, no dependency or security posture change. It modestly widens the set of legacy codebases that can install the package, which slightly changes the triage answer for Symfony 5 estates — and changes nothing about the recommendation. Adoption remains narrow and mostly legacy:

  • The application is Symfony (this is a bundle, not Laravel), runs a supported-in-place PHP version, and already carries Kdyby/Nette-era dependencies, so the marginal integration cost is near zero.
  • You are maintaining PHP 7.x code on Symfony 4 or 5 that predates symfony/clock and cannot yet adopt PSR-20. Note that Symfony 5's EOL raises the cost of staying on that path, so use this only as bridge scaffolding with a dated exit.
  • You need a short-term patch to make an existing test suite deterministic while a broader clock migration is scheduled.

Look elsewhere — or build nothing — in most other cases:

  • Laravel projects: this package does not apply. Laravel ships the capability natively via Carbon::setTestNow() and Illuminate\Support\Carbon; there is no integration gap to fill.
  • Modern Symfony: symfony/clock (PSR-20 ClockInterface with MockClock) is the maintained, standards-aligned replacement and should be the default recommendation.
  • Any new build: 0 dependents, a single trivial release after six years of silence, and NOASSERTION licensing are abandonment and legal risks. Do not take a new dependency here — Symfony 5 compatibility is not a reason to start.
  • If the real need is timezone handling or date formatting, this package is not the answer — that is Carbon/DateTimeImmutable territory.

How to Pitch It (Stakeholders)

Executives: This is a six-star, effectively unmaintained Symfony bundle with an unclear license. A new release landed, but it only permits Symfony 5 — a framework version that is itself end-of-life — with no new features, no security work, and no license resolution. Do not adopt it. The principle it represents — treating "current time" as an injectable dependency rather than a hardcoded global — is worth funding, because it directly reduces flaky tests and speeds up delivery of every time-based feature on the roadmap (trials, renewals, SLAs, scheduled comms). The recommendation is unchanged: standardize on symfony/clock / PSR-20 for Symfony and native Carbon test helpers for Laravel, and treat this package as a migration item if it appears in the estate. Expected cost is small; expected benefit is fewer escaped defects in billing- and deadline-adjacent flows.

Engineering: Adopt the pattern, not the package. Inject a ClockInterface (PSR-20) wherever business logic reads "now"; use MockClock in tests to pin time. If you are on Laravel, use Carbon::setTestNow() — no new dependency required. If you find kdyby/datetime-provider-bundle in a legacy Symfony codebase, log it as tech debt with a replacement path to symfony/clock, and flag the NOASSERTION license to legal before any further use. Treat v1.0.2 as a compatibility bump only — do not read it as a signal that the package is maintained, and do not use it to justify extending a Symfony 5 (EOL) lifespan.

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.
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk