spatie/test-time
Control time in tests with Spatie TestTime—freeze or advance Carbon-based timestamps dynamically for time-sensitive assertions. Simplify testing date-dependent logic by manually adjusting time without altering real-world clocks. Works seamlessly with Carbon’s methods like addYear(), subDay(), or cus...
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| spatie/pest-plugin-test-time | 0.85 | Pest plugin to control time in tests via Carbon::setTestNow(): freeze “now” and easily move it forward/backward (e.g., addMinute). Includes a toBeCarbon expectation for asserting Carbon dates/times and formats. | 50 | 50 | 8 | 43K | 0 | 5.2 | 41.1 | MIT | 10 months ago | |
| beste/clock | 0.82 | 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 | |
| spatie/period | 0.82 | Immutable date period objects for PHP with powerful comparison tools. Create periods from any DateTime (including Carbon), then calculate overlaps, gaps, intersections, differences, containment, and other complex comparisons across two or many periods. | 1,697 | 1,699 | 76 | 164K | 0 | 19.9 | 27.5 | MIT | 3 years ago | |
| spatie/phpunit-snapshot-assertions | 0.80 | Add snapshot testing to PHPUnit. Save expected output (JSON, arrays, strings, etc.) on first run and automatically compare on later runs to catch regressions with minimal assertions. Includes handy traits and snapshot update workflow for tests. | 696 | 700 | 74 | 607K | 0 | 30.7 | 46.3 | MIT | 2 months ago | |
| php-standard-library/date-time | 0.80 | 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 | 1 | 0 | 33K | 0 | 19.0 | 63.8 | MIT | 1 month ago | |
| spatie/laravel-flash | 0.80 | Lightweight Laravel package for flashing a single message to the next request via session. Use flash('Message', 'optional-class') in controllers and read flash()->message and flash()->class in your Blade views to display and style it. | 669 | 673 | 31 | 44K | 0 | 22.1 | 26.8 | MIT | 5 months ago | |
| spatie/google-time-zone | 0.80 | Convert GPS coordinates to a time zone using Google’s Time Zone API. Fetch DST and raw offsets plus timeZoneId and timeZoneName for any latitude/longitude. Works in any PHP project, with optional Laravel config publishing and auto-discovery. | 109 | 111 | 15 | 23K | 0 | 15.9 | 35.2 | MIT | 5 months ago | |
| spatie/url | 0.79 | Immutable URL parser/builder for PHP. Parse scheme, host, path and query, then fluently transform parts (withHost, withPath, withScheme) and manage query parameters. Supports allowed/sanitized schemes for safer URL handling. | 741 | 754 | 60 | 458K | 0 | 12.4 | 38.6 | MIT | 2 years ago | |
| digital-craftsman/datetime-parts | 0.78 | Value objects for precise date/time parts in PHP: Moment (UTC-based) plus Time, Date, Month, Year, Day/Weekday and collections. Avoid misleading DateTime comparisons, handle timezone-safe modifications across DST, with Symfony normalizers and Doctrine types. | 0 | 0 | 0 | 0 | 5 | 22.4 | 2.1 | MIT | 4 months ago | |
| spatie/error-solutions | 0.73 | Collection of reusable “solutions” for common runtime errors, used by Spatie’s error tools like Ignition and Flare. Provides a shared way to suggest fixes and actionable hints when exceptions occur in Laravel and PHP apps. | 67 | 67 | 8 | 4M | 0 | 19.1 | 61.8 | MIT | 4 months ago |
How can I help you explore Laravel packages today?