You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[13.x] artisan test --parallel broken with PHPUnit 13.4: PhpHandler requires Emitter #61857
PHPUnit 13.4.0 (released 2026-10-02) changed the constructor of PHPUnit\TextUI\Configuration\PhpHandler, which now requires a PHPUnit\Event\Emitter argument:
publicfunction __construct(Emitter$emitter)
Illuminate\Testing\Concerns\RunsInParallel still instantiates it without arguments (line 110, same on 13.x and master):
(newPhpHandler())->handle($configuration->php());
As a result, php artisan test --parallel fails immediately with an ArgumentCountError as soon as phpunit/phpunit 13.4.0 is installed. Non-parallel runs are not affected.
PHPUnit itself now calls it as new PhpHandler($this->emitter) (src/TextUI/Application.php). A possible fix keeping compatibility with PHPUnit < 13.4 would be to pass PHPUnit\Event\Facade::emitter() when the constructor has a required parameter.
Other versions: nunomaduro/collision 8.9.5, brianium/paratest 7.25.0.
Workaround for now: pin "phpunit/phpunit": "~13.3.6".
Steps To Reproduce
Fresh Laravel 13.34.0 app with phpunit/phpunit 13.4.0 and brianium/paratest.
Run php artisan test --parallel.
ArgumentCountError: Too few arguments to function PHPUnit\TextUI\Configuration\PhpHandler::__construct(), 0 passed.
Activity