symfony/clock
Symfony Clock decouples your code from the system clock. Inject ClockInterface to get DateTimeImmutable via now(), control timezones, and pause execution with sleep(). Ideal for testable, time-sensitive services without relying on global time.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| lcobucci/clock | 0.92 | Clock abstraction for PHP to decouple your code from DateTimeImmutable instantiation. Depend on the Clock interface and use SystemClock for real time (with timezone support) or FrozenClock for deterministic, test-friendly time in unit tests. | 799 | 802 | 32 | 6M | 1 | 25.6 | 60.1 | MIT | 3 months ago | |
| comsolit/clock-bundle | 0.89 | — | 0 | 0 | 1 | 0 | 4 | 1.0 | 0.8 | — | — | |
| eventsauce/clock | 0.89 | 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 | 39K | 0 | 0.1 | 55.1 | — | — | |
| alexeyshockov/clock | 0.89 | — | 2 | 2 | 2 | 0 | 6 | 0.8 | 1.1 | — | — | |
| beste/clock | 0.87 | 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. | 75 | 75 | 1 | 1M | 0 | 2.6 | 55.3 | MIT | 3 years ago |
How can I help you explore Laravel packages today?