← ClaudeAtlas

pest5-upgradelisted

Upgrade a PHP/Laravel repo from Pest 4 to Pest 5 and turn on Test Impact Analysis (TIA) so local full runs only re-execute the tests a change can reach. Use this whenever someone mentions upgrading Pest, moving to Pest 5, `pestphp/pest ^5`, Test Impact Analysis, `--tia`, "why is my test suite so slow", speeding up a slow PHP test suite, `Tia mode requires Pest tests`, `WorkerCrashedException` after enabling TIA, converting PHPUnit class-style tests to Pest, or setting up a TIA baseline — even if they don't say "Pest 5" outright. Also use it when a Pest/PHPUnit dependency bump has broken tests and they need help attributing the fallout.
bravros/bravros · ★ 2 · AI & Automation · score 75
Install: claude install-skill bravros/bravros
# Pest 4 → 5 + Test Impact Analysis Turn a full local run into one that executes only the tests the current diff can reach. Measured on a real 18,594-test Laravel suite: **655 s cold → 5.83 s** for a one-file change. The version bump is nearly free. Almost all the work is step 2, and almost all the pain is traps that surface as unrelated failures. Work in order — each checkpoint is what makes the next step diagnosable. **Scope: local adoption.** CI baseline sharing (`->baselined()` plus a workflow publishing the graph) is out of scope — it was attempted, three bugs were found in the upstream recipe, and it was parked. If asked for it, read `references/ci-baseline.md` first. ## 1. Preconditions Needs PHP 8.4+ (`pest@5` requires `^8.4`, pulls `phpunit ^13.3`), a **coverage driver** (pcov or Xdebug — TIA records its graph through it and cannot run without one; prefer pcov, several times faster), and a **green full suite** to attribute fallout against. Then count the real work, because it sets the schedule — two class-style tests is an afternoon, fifty is a different project: ```bash grep -rln --include='*Test.php' -E '^\s*(final\s+)?(abstract\s+)?class\s+\w+Test\b' tests/ ``` ## 2. Upgrade ```bash composer update pestphp/pest --with-all-dependencies # narrow, not a bare `composer update` ``` **Expect unrelated fallout.** Even the narrow form moves transitive dependencies. When a test fails after the bump, diff **`composer.lock`**, not `composer.json`, and check wheth