diff --git a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit index 2e23aa890054..85479fd28d35 100755 --- a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit +++ b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit @@ -90,6 +90,18 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__ if ($exit) { exit($exit); } + // Fix compatibility to custom TestRunner for PhpUnit 8 compatibility + if ($PHPUNIT_VERSION >= 8.0) { + $testRunnerFile = 'src/TextUI/TestRunner.php'; + file_put_contents( + $testRunnerFile, + str_replace( + 'final class TestRunner', + 'class TestRunner', + file_get_contents($testRunnerFile) + ) + ); + } file_put_contents('phpunit', <<<'EOPHP'