paratestphp / paratest

:computer: Parallel testing for PHPUnit
MIT License
2.32k stars 229 forks source link

ParaTests 7.3.1 incompatible with PHPUnit 10.5.32+ #890

Closed ghunti closed 2 months ago

ghunti commented 2 months ago
Q A
ParaTest version 7.3.1
PHPUnit version 10.5.35
PHP version 8.1.27

Summary

PHPUnit 10.5.32 introduced a BC on the src/TextUI/ShellExitCodeCalculator.php::calculate() method. You backported this to 7.4.X branch with https://github.com/paratestphp/paratest/pull/888 The problem I face is:

  1. I'm still using PHP 8.1 and while PHPUnit 10.5.35 supports PHP 8.1, ParaTests 7.4.X does not
  2. ParaTests 7.3.1 (the latest supporting) PHP 8.1, supports PHPUnit ^10.4.2 which should include 10.5.32

Current behavior

When running the tests I get the following error: PHPUnit\TextUI\ShellExitCodeCalculator::calculate(): Argument #8 ($failOnWarning) must be of type bool, PHPUnit\TestRunner\TestResult\TestResult given, called in /root/build/infraspeak/web/web-core-api/vendor/brianium/paratest/src/WrapperRunner/WrapperRunner.php on line 296

How to reproduce: command, code and error stack trace

Simply run paratests

Expected behavior

ParaTests version 7.3.X should work with PHPUnit ^10.4.2 versions

Thank you for your patience and work

Slamdunk commented 2 months ago

Pin an older version of PHPUnit, or upgrade your PHP environment.

Duplicate of https://github.com/paratestphp/paratest/issues/889

ghunti commented 1 month ago

@Slamdunk any chance of fixing the composer.jsonon 7.3.x branch to make it only compatible with PHPUnit <= 10.3.31 ?

In our case, all pipelines were green, even though they had errors. I bet similar cases are happening or will happen to other people under the same conditions. Cheers :-)

Slamdunk commented 1 month ago

I can re-add PHP 8.1 support for the 7.4.x branch: that's a € 1.000 one-time sponsorship job.

Ping me if you're interested :+1: