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

Timecop Bundle Laravel Package

kolemp/timecop-bundle

Timecop Bundle freezes, travels, and scales time in your tests so date- and time-dependent code behaves predictably. Control the clock globally, write deterministic assertions for Carbon and DateTime, and eliminate flaky time-based failures.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Time-dependent feature validation. The core job-to-be-done is testing behavior that only manifests as the clock moves: trial expiry, subscription renewal and proration, invoice/dunning cycles, scheduled jobs, expiring tokens and signed URLs, content aging, streak and SLA counters, month-end and DST edge cases. A time-travel harness collapses "wait 30 days" into a test assertion, which directly shortens the feedback loop on any roadmap item with a date in it.
  • Deterministic CI vs. flaky suites. If your pipeline has tests that fail on the 1st of the month, on leap days, or when a run straddles midnight UTC, this is a reliability investment, not a feature investment. The PM decision is whether to fund a small test-infrastructure epic rather than absorb recurring flake triage.
  • Build vs. buy vs. adopt. The realistic decision here is rarely "adopt this package" — it is "do we buy into a pattern (an injectable, overridable clock) or keep patching tests ad hoc?" This package is one implementation of that pattern; the pattern is the durable decision.
  • Support and demo workflows. Cross-process time control has a second use case beyond CI: reproducing a customer bug ("my invoice generated on the 31st") or running a sales demo in a simulated future date against a live staging environment, without code changes or database surgery.
  • Risk posture on dependencies. With 4 stars, 0 dependents, a last release in September 2018, and a composite score of 0.05, this is a signal to codify a dependency-adoption policy (maintenance floor, security patching expectations) rather than a signal to adopt.

When to Consider This Package

Consider it only under a narrow set of conditions:

  • You are on Symfony, not Laravel — despite the "Laravel/PHP package" framing, this is a Symfony bundle, and a Laravel team would be porting, not installing. That alone usually ends the evaluation.
  • You need time control across process boundaries — a real HTTP server, a browser-driven functional test, or a staging app — where in-process test helpers cannot reach. This is the one genuinely differentiated capability.
  • Your PHP runtime still supports the underlying mechanism (the package era implies PHP 7.x and, typically, a PECL-level time-travel extension), and your CI/hosting can actually install and enable it.
  • The blast radius is contained: test and staging environments only, never production, and you can vendor or fork it if needed.

Look elsewhere — and default to elsewhere — when:

  • You are on Laravel: Carbon::setTestNow() and the travel()/freezeTime() helpers already solve the in-process case with zero new dependencies.
  • You are on Symfony 6.2+: the native Clock component plus ClockMock covers the same ground with first-party maintenance.
  • You cannot install PECL extensions, or you run PHP 8+ where the historical time-travel extension is unmaintained and may not build.
  • Your organization requires a maintained dependency with a security-response path. A 2018 release with zero dependents has no community safety net; a CVE or a PHP minor-version break means you own the fix.
  • You need only a handful of date assertions — a thin internal helper around an injected clock is cheaper than adopting an unmaintained bundle.

How to Pitch It (Stakeholders)

To executives: This is a small, MIT-licensed test-infrastructure utility that lets engineers simulate future or past dates in test and staging environments, so we can prove that trials expire, invoices generate, and scheduled jobs fire correctly without waiting real calendar time. It is cheap to trial but effectively unmaintained — last release in 2018, negligible adoption, no dependents — so I do not recommend it as a production dependency. The recommendation is to adopt the capability using our framework's native clock abstraction (Carbon test helpers on Laravel, the Clock component on modern Symfony), which delivers the same business outcome with a maintained, first-party dependency and no new supply-chain risk.

To engineering: The valuable idea is decoupling domain logic from the system clock so time becomes an injectable, controllable input — that is what makes expiry, billing, and scheduling logic testable and what unblocks deterministic CI. This bundle is a thin wrapper around that idea from the PHP 7 / Symfony 3–4 era and is a poor fit for a current stack; it is worth ten minutes as a reference implementation, not a composer require. If we have a genuine cross-process requirement (browser tests or a live staging demo), flag it and we will scope an internal equivalent rather than depend on this one.

Ask: Approve a small time-determinism spike scoped to the modules with date-sensitive logic, with the explicit decision point being native clock abstraction vs. no action — not adoption of this package.

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.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels