symfony/clock
Symfony Clock decouples your app from the system clock. Inject ClockInterface to get deterministic time via now() and control behavior like sleep() and time zones. Ideal for testable, time-sensitive code without relying on global time functions.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| lcobucci/clock | 0.90 | 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. | 790 | 792 | 32 | 5M | 1 | 30.3 | 61.8 | MIT | 5 months ago | |
| eventsauce/clock | 0.88 | Simple clock abstraction for PHP. Use SystemClock in production and TestClock in tests to control time deterministically. Get now() as DateTimeImmutable, access timeZone(), move time forward, tick to system time, or fixate to a specific moment. | 3 | 3 | 2 | 38K | 0 | 0.1 | 55.0 | — | — | |
| beste/clock | 0.88 | beste/clock is a lightweight PHP clock implementation for time-dependent code. It provides a simple, test-friendly way to obtain the current time, swap in fixed or mock clocks, and improve determinism across your application and automated tests. | 74 | 74 | 1 | 1M | 0 | 22.5 | 65.0 | MIT | 3 years ago | |
| psr/clock | 0.86 | PSR-20 Clock interface for PHP. Defines ClockInterface::now() returning DateTimeImmutable, enabling dependency injection of time sources and easy testing. This package provides only the interface; use or create an implementation. | 638 | 643 | 6 | 13M | 0 | 23.7 | 65.0 | MIT | 3 years ago | |
| php-standard-library/date-time | 0.86 | Immutable, timezone-aware DateTime types for PHP. Provides Duration, Period, and Interval helpers for safer date/time arithmetic and ranges, designed as a standard-library style package with clear docs and contribution links. | 1 | 0 | 0 | 8K | 0 | 20.6 | 58.7 | MIT | 2 weeks ago | |
| nesbot/carbon | 0.85 | Carbon is a PHP DateTime extension that makes working with dates and times simple and readable. Parse, format, compare, add/subtract intervals, handle timezones and localization, and use fluent, human-friendly helpers for common date tasks. | 169 | 584 | 26 | 12M | 3 | 27.3 | 66.2 | MIT | 2 days ago |
How can I help you explore Laravel packages today?