facile-it/paraunit
Run PHPUnit test suites faster by executing tests in parallel across multiple processes. Includes a Symfony-based CLI, supports modern PHPUnit/Symfony versions, and can collect code coverage in parallel with automatic selection of the best available driver.
phpunit.xml (automatically prompted on first run). No manual test suite refactoring needed.phpunit commands with vendor/bin/paraunit run, maintaining familiarity for developers.--group, --exclude-group) via CLI flags, preserving existing Laravel test configurations.--stop-on-failure or isolate transaction-heavy tests.AppServiceProvider::boot()) to avoid shared state issues.--chunk-size to limit parallelism.--debug flag or --stop-on-failure to isolate issues.phpunit --list-tests to identify stateless vs. stateful tests.composer require --dev facile-it/paraunit
vendor/bin/paraunit run
--processes (default: CPU core count).vendor/bin/paraunit run --exclude-testsuite="StatefulTests"
vendor/bin/paraunit coverage --html=storage/coverage
phpunit commands with paraunit in CI pipelines.- name: Run tests
run: vendor/bin/paraunit run --stop-on-failure
phpunit alias in composer.json scripts for quick fallback:
"scripts": {
"test": "paraunit run",
"test:legacy": "phpunit"
}
| Component | Compatibility | Notes |
|---|---|---|
| PHPUnit | 10.5.4+, 11+, 12+, 13.0 | Laravel typically uses PHPUnit 10+ |
| Symfony | 4.4+, 5, 6, 7, 8 | Laravel uses Symfony components |
| PHP Versions | 7.0–8.4 | Laravel 9+ requires PHP 8.0+ |
| Laravel Testing | Works with Laravel’s TestCase, HttpTests, etc. |
No changes needed |
| Coverage Tools | Pcov (fastest), Xdebug, PHPDbg (fallback) | Pcov recommended for CI |
| CI/CD Pipelines | GitHub Actions, GitLab CI, CircleCI, etc. | No vendor-specific changes required |
--stop-on-failure and test isolation.phpunit in production pipelines.--chunk-size or exclusions.--processes based on CI machine specs (e.g., 4–8 for GitHub Actions).vendor/bin/paraunit coverage --cobertura=coverage.xml
--exclude-testsuite flags if test suite grows. Mitigation: Document exclusions in README.md.--debug to log process outputs:
vendor/bin/paraunit run --debug --stop-on-failure
--processes=4.paraunit or phpunit.How can I help you explore Laravel packages today?