handcraftedinthealps/code-coverage-checker
CLI tool to enforce PHPUnit code coverage thresholds. Generate a coverage.php report, then check line/class/method coverage against a minimum percentage, optionally limited to specific directories—ideal for CI to fail builds when coverage drops.
A code coverage checker for phpunit.
composer require handcraftedinthealps/code-coverage-checker --dev
phpunit --coverage-php "Tests/reports/coverage.php"
vendor/bin/code-coverage-checker "Tests/reports/coverage.php" "line" "96.0"
Instead of line you can use class or method.
You can also check only specific directories:
vendor/bin/code-coverage-checker "Tests/reports/coverage.php" "line" "96.0" "Directory/A" "Directory/B"

How can I help you explore Laravel packages today?