Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Test Time Laravel Package

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...

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit is excellent as Laravel's default time handling relies on Carbon, which this package directly manipulates. It's designed as a dev dependency for testing, aligning perfectly with Laravel's testing workflow. Integration feasibility is high due to minimal setup (composer require --dev) and straightforward API. Technical risks include potential global state side effects if not properly managed (e.g., forgetting to unfreeze), and compatibility dependencies on Carbon's internal behavior—though the package explicitly supports Carbon 2.63+ and 3.0. Key questions: How does it handle parallel test execution (e.g., Pest's parallel mode)? Does it reset state automatically between tests? What happens if an exception occurs before unfreeze()? How does it interact with Laravel's built-in time mocking helpers like now() or Carbon::setTestNow()?

Integration Approach

Stack fit is seamless with Laravel's testing ecosystem (PHPUnit/Pest), as it replaces manual time mocking with a dedicated helper. Migration path involves replacing existing time manipulation code (e.g., Carbon::setTestNow()) with TestTime::freeze() and related methods in test setups. Compatibility is strong for Laravel 8+ (Carbon 2) and Laravel 10+ (Carbon 3), with explicit version constraints in composer.json. Sequencing should prioritize new tests

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai