Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Paraunit Laravel Package

facile-it/paraunit

Run PHPUnit test suites faster by executing tests in parallel across multiple processes. Symfony-based CLI with Composer install, supports many PHPUnit/Symfony versions, and can collect code coverage in parallel (auto-picks best driver like PCOV/Xdebug).

View on GitHub
Deep Wiki
Context7

paraunit

Frequently asked questions about Paraunit
How do I install paraunit in a Laravel project?
Run `composer require --dev facile-it/paraunit` in your project root. Paraunit integrates as a CLI tool via Composer’s bin directory, so no additional Laravel service provider or config is needed. Replace `phpunit` commands in your `composer.json` scripts with `paraunit run` for parallel execution.
Does paraunit work with Laravel’s Pest framework?
Yes, paraunit fully supports Pest. Replace Pest’s parallel execution with `paraunit run --group=unit` or `--group=feature` for granular control. Pest’s test groups and assertions remain unchanged, but execution speed improves significantly. Use `--stop-on-failure` in CI to mirror Pest’s default behavior.
Will paraunit break my existing Laravel Dusk tests?
No, paraunit is designed to work with Dusk out of the box. Use `paraunit run --display-warnings` to catch Selenium/ChromeDriver issues during parallel browser tests. The Symfony Process fallback ensures compatibility even without PCNTL, though performance may vary on Windows CI environments.
What Laravel/PHPUnit versions does paraunit support?
Paraunit 2.x supports PHPUnit 10.5.4+, 11+, 12+, and 13.0, and Symfony 4.4–8. It’s compatible with Laravel 8+ (PHP 7.4+) and Laravel 9/10 (PHP 8.0+). Check the [compatibility table](https://github.com/facile-it/paraunit#compatibility) for specific version pairings.
How do I enable parallel coverage collection in Laravel?
Run `paraunit coverage --html=./storage/logs/coverage` to generate HTML reports. Paraunit auto-detects the best coverage driver (PCov/Xdebug) and merges results in parallel. For CLI tools, use `--clover=./coverage.clover` to integrate with Laravel Forge or similar services.
Can I use paraunit in GitHub Actions without PCNTL?
Yes, paraunit falls back to Symfony’s Process component if PCNTL isn’t available. Performance may degrade slightly, but it remains functional. For Windows runners, reduce parallel processes with `--processes=2` to avoid resource contention. Test with `paraunit run --stop-on-failure` to fail fast in CI.
Does paraunit support Laravel’s custom PHPUnit listeners?
Yes, paraunit preserves all PHPUnit listeners and extensions. If you use custom listeners (e.g., for Laravel’s `RefreshDatabase` trait), they’ll work as expected. However, avoid `--stop-on-*` flags if listeners rely on test completion order, as parallel execution may alter execution sequences.
How do I debug failing tests in parallel mode?
Use `paraunit run --stop-on-failure` to halt execution on the first failure, similar to Laravel’s default behavior. For verbose output, add `--display-warnings` or `--display-deprecations`. If tests pass in serial but fail in parallel, check for race conditions with `--sort=random` to shuffle test order.
What’s the best way to migrate from phpunit to paraunit in Laravel?
Replace `phpunit` with `paraunit run` in your `composer.json` scripts. No changes to `phpunit.xml` are needed. For CI, update workflows to use `paraunit run --stop-on-failure --coverage`. Test incrementally by running a subset of tests first (e.g., `--filter=UserTest`).
Are there alternatives to paraunit for Laravel?
Yes, alternatives include PHPUnit’s built-in parallel mode (`phpunit --parallel`) or tools like `php-parallel-lint`. However, paraunit offers deeper PHPUnit integration (e.g., coverage merging, Symfony Process fallback) and better Laravel-specific features like Pest/Dusk support. Benchmark your project to compare speed and compatibility.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai