phpunit/php-code-coverage
phpunit/php-code-coverage collects, processes, and renders PHP code coverage data. Integrate it in test runs to start/stop coverage collection, filter included files, and generate reports such as OpenClover, including from serialized coverage data.
Adopt if:
match, attributes, traits).Look elsewhere if:
For Executives: "This package enables us to automate code quality enforcement with minimal overhead. By integrating into our CI pipeline, we can block low-coverage merges, reducing bugs in production. It’s a lightweight, open-source alternative to expensive tools—used by PHP’s core team—and supports compliance reporting out of the box."
For Engineering: *"We can replace ad-hoc coverage scripts with a maintained, PHP-native solution that:
match, attributes) that older tools miss.Example win: Cut manual test review time by 30% by surfacing uncovered logic in HTML reports during PRs."*
For QA/Security: "This gives us audit-ready reports (XML/CLI) to validate test coverage for security reviews. The Cobertura format integrates with tools like SonarQube if needed, and we can enforce thresholds (e.g., 90% coverage for critical modules) in CI."
How can I help you explore Laravel packages today?