sanmai/duoclock
PSR-20 clock abstraction with dual time access (DateTimeImmutable, time(), microtime()) plus mockable sleep/usleep/nanosleep for testing. Includes deterministic TimeSpy and tick helpers to measure elapsed time. Minimal dependency (psr/clock) and easy to mock.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| beste/clock | 0.84 | 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 | |
| eventsauce/clock | 0.83 | 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 | 44K | 0 | 0.1 | 55.3 | — | — | |
| alexeyshockov/clock | 0.82 | — | 2 | 2 | 2 | 0 | 6 | 0.8 | 1.1 | — | — | |
| cakephp/chronos | 0.81 | Chronos provides immutable date/time objects for PHP, helping prevent accidental mutations and side effects. Includes ChronosDate for calendar dates fixed at 00:00:00, plus convenient APIs inspired by Carbon but no longer extending DateTime. | 1,362 | 1,369 | 70 | 824K | 2 | 31.7 | 42.9 | MIT | 5 months ago | |
| comsolit/clock-bundle | 0.81 | — | 0 | 0 | 1 | 0 | 4 | 1.0 | 0.8 | — | — | |
| psr/clock | 0.81 | 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 | |
| lcobucci/clock | 0.79 | 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 |
How can I help you explore Laravel packages today?