Where Does PHPUnit Store Config and Cache?
PHPUnit reads phpunit.xml per project for suites and coverage, caching results in .phpunit.cache beside it for ordering and defect reruns.
Last updated
PHPUnit splits durable config from disposable cache per project. The XML declares suites, bootstrap, and coverage in versioned form. The result cache beside it remembers ordering and defects.
Defects first reruns read that cache to run failures early. Deleting it loses nothing but ordering memory. Teams share XML while ignoring cache outputs.
Where PHPUnit stores this, by platform
phpunit.xml + .phpunit.cache/
Versioned suites plus bootstrap config. Result cache beside it speeds reruns. Ignore cache in git.
Frequently asked questions
How do I clear the PHPUnit result cache?
Delete .phpunit.cache to force full reruns without ordering memory. Corrupt caches cause phantom skips. CI usually starts clean anyway.
Notice an outdated path? Let us know.