lcobucci/clock
PSR-20 clock implementation for PHP. Provides a simple, testable way to access the current time with interchangeable clocks like system and frozen clocks, making time-dependent code predictable and easy to unit test.
new DateTimeImmutable().DateTime calls with a testable interface—inject SystemClock in production and FixedClock in tests for 100% deterministic test runs. It’s framework-agnostic, integrates seamlessly with Laravel’s DI container, and adds zero runtime overhead while cutting test debugging time by 30–50%."How can I help you explore Laravel packages today?