brianium/paratest
ParaTest runs PHPUnit tests in parallel with zero config—just use vendor/bin/paratest. Speed up suites by TestCase or individual tests, with support for unique per-process TEST_TOKEN env vars and combined code coverage reports across workers.
Avoid if:
pcov, xdebug, or phpunit --coverage)—this fix is irrelevant.Consider alternatives if:
*"ParaTest v7.22.4 fixes a critical bug in coverage reporting, ensuring our test suites deliver accurate, mergeable coverage metrics in parallel runs. This resolves:
- False coverage failures in CI (e.g., builds marked as ‘failing’ due to incorrect merged reports).
- Audit risks from incomplete or misleading coverage data.
- Developer frustration when chasing phantom gaps in test coverage.
Impact:
- Zero code changes needed—upgrade via
composer update.- Validated by 2.5K+ projects, including Laravel and Symfony.
- MIT-licensed, with active community contributions (e.g., new contributor @boboldehampsink).
Ask: ‘Should we prioritize this upgrade to eliminate coverage-related CI flakiness in our next sprint?’"
*"v7.22.4 resolves a merged coverage report bug (PR #1105) where parallel test runs could produce incomplete or corrupted coverage files. This affects:
- PHPUnit
--coverageorpcov/xdebugusers runningparatestwith coverage enabled.- CI pipelines relying on merged reports (e.g., SonarQube, CodeClimate).
Fix Details:
- Root cause: Race conditions in coverage data aggregation across processes.
- Solution: Synchronized merging of coverage reports with no breaking changes.
Action Items:
- Upgrade: Run
composer update paratestphp/paratest --dev.- Validate: Test with your slowest coverage-heavy suite (e.g.,
phpunit --coverage-clover=coverage.clover).- CI Update: Ensure your coverage tooling (e.g., GitHub Actions, SonarScanner) processes merged reports correctly.
Gotchas:
- If using custom coverage post-processing, verify compatibility with merged outputs.
- No impact on non-coverage workflows (e.g.,
paratestwithout--coverage).Proposal: ‘Let’s upgrade and retest our coverage reports in CI to confirm stability.’"*
How can I help you explore Laravel packages today?