pcov/clobber
Clobber PHPUnit 5–7’s Xdebug code coverage driver to use PCOV instead. Install with composer and run vendor/bin/pcov clobber or unclobber (optionally targeting another directory). Useful when upgrading to PHPUnit 8 isn’t feasible.
Adopt if:
void return type issues) and cannot upgrade immediately.Look elsewhere if:
For Executives: "This package allows our Laravel team to maintain PCOV-based code coverage in legacy PHPUnit 5/6/7 environments without forcing a costly upgrade to PHPUnit 8. It resolves CI/CD instability caused by Xdebug-PCOV conflicts, ensuring reliable test results and faster feedback cycles. With minimal setup and no long-term maintenance burden, it’s a low-risk solution to unblock testing for legacy projects while we plan a phased migration to modern tooling. The MIT license and lightweight implementation reduce vendor risk, and it can be removed once we upgrade PHPUnit."
For Engineering: *"pcov/clobber is a drop-in CLI tool that replaces Xdebug with PCOV for PHPUnit 5/6/7, enabling accurate code coverage in Laravel projects stuck on older PHPUnit versions. To use it:
composer require pcov/clobber --dev.vendor/bin/pcov clobber before tests in CI or local environments.vendor/bin/pcov unclobber afterward to restore Xdebug for debugging.
This fixes flaky CI runs and coverage discrepancies caused by Xdebug conflicts, with zero code changes. Ideal for teams migrating incrementally or constrained by legacy dependencies. Just add it to your phpunit.xml or CI scripts, and you’re done."*How can I help you explore Laravel packages today?