eventsauce/clock
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.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| alexeyshockov/clock | 0.90 | — | 2 | 2 | 2 | 0 | 6 | 0.8 | 1.1 | — | — | |
| lcobucci/clock | 0.87 | 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 | 801 | 32 | 6M | 1 | 24.2 | 59.2 | MIT | 5 months ago | |
| symfony/clock | 0.86 | 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. | 433 | 437 | 3 | 13M | 0 | 28.1 | 62.9 | MIT | 3 months ago | |
| comsolit/clock-bundle | 0.84 | — | 0 | 0 | 1 | 0 | 4 | 1.0 | 0.8 | — | — | |
| eventsauce/eventsauce | 0.83 | EventSauce is an opinionated, no-nonsense PHP library for introducing event sourcing. Choose storage and queueing mechanisms to fit your needs, with supporting test tooling built for an event-sourcing workflow. Docs: eventsauce.io/docs | 870 | 867 | 84 | 43K | 5 | 9.3 | 27.6 | MIT | — | |
| beste/clock | 0.81 | 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 | 23.0 | 64.9 | MIT | 4 weeks ago | |
| psr/clock | 0.74 | 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. | 645 | 645 | 7 | 16M | 0 | 3.7 | 55.3 | MIT | 3 years ago | |
| itsgoingd/clockwork | 0.72 | Clockwork is a browser-based dev tool for PHP/Laravel that profiles your app in real time. Inspect request data, performance, logs, database/cache/Redis queries, events, views, commands, queue jobs and tests—all from a clean timeline UI. | 5,946 | 5,993 | 334 | 735K | 32 | 54.1 | 41.1 | MIT | 2 years ago |
How can I help you explore Laravel packages today?