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.
.clover files could mislead stakeholders about test coverage.TEST_TOKEN isolation, static state mitigation, and queue worker support remain fully applicable.phpunit --coverage-clover), ensuring compatibility with tools like Scrutinizer or SonarQube.phpunit.xml or Laravel test bootstrappers.--junit output).paratest_for_phpstorm) remains untouched.| Risk Area | Updated Mitigation |
|---|---|
| Coverage Inconsistencies | RESOLVED: PR #1105 fixes merged coverage reports. Validate with: |
| ```bash | |
| vendor/bin/paratest --coverage-clover=coverage.xml --passthru-php="'-d pcov.enabled=1'" | |
| ``` | |
| Legacy PHPUnit | Unchanged: Still blocks versions <10.5. |
| Static State Corruption | Unchanged: Requires manual enforcement (filesystem locks). |
| Database Contention | Unchanged: TEST_TOKEN isolation remains critical. |
.clover files?phpunit.xml <listeners>) that might conflict?--functional mode requirements.# Sequential baseline
vendor/bin/phpunit --coverage-clover=baseline.clover
# Parallel (new version)
vendor/bin/paratest --coverage-clover=parallel.clover --passthru-php="'-d pcov.enabled=1'"
# Diff reports
diff <(wc -l baseline.clover) <(wc -l parallel.clover)
TestCases with --shard-count=4 and validate TEST_TOKEN isolation.--passthru-php for PCov:
# GitHub Actions example (updated)
- run: vendor/bin/paratest --junit --coverage-clover=coverage.xml --passthru-php="'-d pcov.enabled=1'"
| Component | Updated Notes |
|---|---|
| PCov/xDebug | FIXED: Merged coverage reports now accurate. |
| Custom Coverage Listeners | Test: Ensure no conflicts with phpunit.xml <listeners>. |
| Database | Unchanged: TEST_TOKEN isolation still required. |
| Redis/Memcached | Unchanged: --functional mode recommended for shared state. |
phpunit with paratest for unit tests.--functional for integration tests..clover file size deviates >5% from baseline..clover files (e.g., retry with --passthru-php).--do-not-fail-on-failure if flaky tests persist.--passthru-php requirement.matrix).| Failure Mode | Detection | Mitigation |
|---|---|---|
| Coverage Report Corruption | .clover file size < expected baseline |
Rollback to v7.22.3; investigate PCov flags. |
| PCov Configuration Issues | Empty or partial coverage data | Add --passthru-php="'-d pcov.enabled=1'" to commands. |
| Zombie Processes | CI hangs after test run | Unchanged: Use --timeout=300 and kill orphaned processes. |
| Static State Leaks | Flaky tests pass sequentially | Unchanged: Refactor to non-static helpers or use filesystem locks. |
How can I help you explore Laravel packages today?