Seen in r1088394,21 but reproducible with the following dummy test:
<?php class MyTest extends MediaWikiIntegrationTestCase { /** * @dataProvider provideFoo */ public function testFoo() { $this->assertTrue( true ); } public static function provideFoo() { $invalid = ThisDoesNotExist::FOO; return [ [] ]; } }
And running:
$ composer phpunit:prepare-parallel:extensions > MediaWiki\Composer\PhpUnitSplitter\PhpUnitXmlManager::listTestsNotice Running `phpunit --list-tests-xml` to get a list of expected tests ... > phpunit '--list-tests-xml=tests-list-extensions.xml' '--testsuite=extensions' Using PHP 8.1.20 Running with MediaWiki settings because there might be integration tests PHPUnit 9.6.19 by Sebastian Bergmann and contributors. Wrote list of tests that would have been run to tests-list-extensions.xml > MediaWiki\Composer\PhpUnitSplitter\PhpUnitXmlManager::splitTestsListExtensions Script MediaWiki\Composer\PhpUnitSplitter\PhpUnitXmlManager::splitTestsListExtensions handling the phpunit:prepare-parallel:extensions event terminated with an exception In PhpUnitXmlManager.php line 87: Could not find file for class PHPUnit\Framework\ErrorTestCase phpunit:prepare-parallel:extensions [--dev] [--no-dev] [--] [<args>...]
The error message gives no hint of what the problem is, or where it is, or anything searchable:
Could not find file for class PHPUnit\Framework\ErrorTestCase
This is particularly problematic because this is the only feedback given by CI to the developer when parallel PHPUnit is enabled (i.e., all the other jobs pass, and all the relevant PHPUnit jobs fail with this message).