paratestphp / paratest

:computer: Parallel testing for PHPUnit
MIT License
2.3k stars 226 forks source link

Support PHPUnit 11.3.3 #881

Closed AJenbo closed 1 week ago

AJenbo commented 1 week ago
Q A
ParaTest version 7.5.3
PHPUnit version 11.3.3
PHP version 8.3.6

Summary

It might be worth considering setting the PHPUnit constraint in composer to only be compatible with known versions to avoid people ending up with incompatible versions. The downside of cause is that people won't get PHPUnit updates before a new version of Paratest is released.

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 

Current behavior

Crash during test finalization

How to reproduce: command, code and error stack trace

Install phpunit 11.3.3 and run tests on a project (possibly with coverage enabled)

Expected behavior

Finish without errors like when using 11.3.2

throcha3 commented 1 week ago

Thanks! Now the issue is more organized and assertive.

AJenbo commented 1 week ago

There is now a PR to fix the issue here: https://github.com/paratestphp/paratest/pull/883