Uncaught TypeError: PHPUnit\TextUI\ShellExitCodeCalculator::calculate(): Argument #8 ($failOnWarning) must be of type bool
throcha3 opened this issue · 6 comments
Q | A |
---|---|
ParaTest version | 7.5 |
PHPUnit version | 11 |
PHP version | 8.3 |
Summary
Current behavior
After finishing testing everything, even when nothing fails, paratest gives me an error because 1 parameter is missing calling the function "" in phpunit vendor class.
Using phpunit instead of paratest don't give me any error and all tests are passing successfully
PHP Fatal error: Uncaught TypeError: PHPUnit\TextUI\ShellExitCodeCalculator::calculate(): Argument #8 ($failOnWarning) must be of type bool, PHPUnit\TestRunner\TestResult\TestResult given, called in /home/thiago/projetos-new/aiq-cron/vendor/brianium/paratest/src/WrapperRunner/WrapperRunner.php on line 295 and defined in /home/thiago/projetos-new/aiq-cron/vendor/phpunit/phpunit/src/TextUI/ShellExitCodeCalculator.php:25 Stack trace: #0 /home/thiago/projetos-new/aiq-cron/vendor/brianium/paratest/src/WrapperRunner/WrapperRunner.php(295): PHPUnit\TextUI\ShellExitCodeCalculator->calculate() #1 /home/thiago/projetos-new/aiq-cron/vendor/brianium/paratest/src/WrapperRunner/WrapperRunner.php(119): ParaTest\WrapperRunner\WrapperRunner->complete() #2 /home/thiago/projetos-new/aiq-cron/vendor/brianium/paratest/src/ParaTestCommand.php(89): ParaTest\WrapperRunner\WrapperRunner->run() #3 /home/thiago/projetos-new/aiq-cron/vendor/symfony/console/Command/Command.php(279): ParaTest\ParaTestCommand->execute() #4 /home/thiago/projetos-new/aiq-cron/vendor/symfony/console/Application.php(1029): Symfony\Component\Console\Command\Command->run() #5 /home/thiago/projetos-new/aiq-cron/vendor/symfony/console/Application.php(316): Symfony\Component\Console\Application->doRunCommand() #6 /home/thiago/projetos-new/aiq-cron/vendor/symfony/console/Application.php(167): Symfony\Component\Console\Application->doRun() #7 /home/thiago/projetos-new/aiq-cron/vendor/brianium/paratest/bin/paratest(37): Symfony\Component\Console\Application->run() #8 /home/thiago/projetos-new/aiq-cron/vendor/bin/paratest(119): include('...') #9 {main} thrown in /home/thiago/projetos-new/aiq-cron/vendor/phpunit/phpunit/src/TextUI/ShellExitCodeCalculator.php on line 25
How to reproduce: command, code and error stack trace
Any laravel project v11, phpunit v11 and paratest v7.5.*
Expected behavior
Should end testing and return no error code.
Looks like this is related to PHP 11.3.3, at least we didn't get it with 11.3.2
Downgraded phpunit from 11.3.2 to 11.2.1 and it worked. Thanks A LOT
The issue is still relevant though as Paratest has to make adjustments for PHPUnit 11.3.3 to work.
For those of us still on PHP 8.1 (Paratest < 7.4), this also happens with PHPUnit 10.5.32.
Any chance of getting a Paratest 7.3.2 release with a fix for that?
Any chance of getting a Paratest 7.3.2 release with a fix for that?
Yes: #883 (comment)