Refresher package speeds up Laravel tests by restoring database snapshots
Laravel's RefreshDatabase runs migrate:fresh in every test process, which can slow down single runs, CI jobs and parallel workers. Refresher, an open-source drop-in replacement, migrates and seeds the test database once, then saves it as a snapshot. Later test processes restore that snapshot until a migration, seeder or factory changes. Benchmarks reported cut per-process time from 3.95 s to 1.87 s on a MySQL project and from 43.3 s to 0.80 s on a seeded SQLite suite. The package requires PHP 8.3 to 8.5 and Laravel 12 or 13, and does not yet support PostgreSQL.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in