sumfony phpunit Fatal error: Declaration of ... must be compatible with ...

PHP Fatal error: Declaration of Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerForV7::addError(PHPUnit\Framework\Test $test, Throwable $t, float $time): void must be compatible with PHPUnit\Framework\TestListener::addError(PHPUnit\Framework\Test $test, Exception $e, $time) in /home/julia/Projects/webbankir/vendor/symfony/phpunit-bridge/Legacy/SymfonyTestsListenerForV7.php on line 27

PHP Stack trace:
PHP 1. {main}() /home/julia/Projects/webbankir/bin/phpunit:0
PHP 2. require() /home/julia/Projects/webbankir/bin/phpunit:18
PHP 3. include() /home/julia/Projects/webbankir/vendor/symfony/phpunit-bridge/bin/simple-phpunit:261
PHP 4. PHPUnit\TextUI\Command::main() /home/julia/Projects/webbankir/bin/.phpunit/phpunit-6.5/phpunit:17
PHP 5. Symfony\Bridge\PhpUnit\Legacy\CommandForV6->run() /home/julia/Projects/webbankir/bin/.phpunit/phpunit-6.5/src/TextUI/Command.php:148
PHP 6. Symfony\Bridge\PhpUnit\Legacy\TestRunnerForV7->doRun() /home/julia/Projects/webbankir/bin/.phpunit/phpunit-6.5/src/TextUI/Command.php:195
PHP 7. Symfony\Bridge\PhpUnit\Legacy\TestRunnerForV7->handleConfiguration() /home/julia/Projects/webbankir/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:156
PHP 8. spl_autoload_call() /home/julia/Projects/webbankir/vendor/symfony/phpunit-bridge/Legacy/TestRunnerForV7.php:29
PHP 9. Composer\Autoload\ClassLoader->loadClass() /home/julia/Projects/webbankir/vendor/symfony/phpunit-bridge/Legacy/TestRunnerForV7.php:29
PHP 10. Composer\Autoload\includeFile() /home/julia/Projects/webbankir/bin/.phpunit/phpunit-6.5/vendor/composer/ClassLoader.php:322
PHP 11. include() /home/julia/Projects/webbankir/bin/.phpunit/phpunit-6.5/vendor/composer/ClassLoader.php:444
PHP 12. class_alias() /home/julia/Projects/webbankir/vendor/symfony/phpunit-bridge/SymfonyTestsListener.php:19
PHP 13. spl_autoload_call() /home/julia/Projects/webbankir/vendor/symfony/phpunit-bridge/SymfonyTestsListener.php:19
PHP 14. Composer\Autoload\ClassLoader->loadClass() /home/julia/Projects/webbankir/vendor/symfony/phpunit-bridge/SymfonyTestsListener.php:19
PHP 15. Composer\Autoload\includeFile() /home/julia/Projects/webbankir/bin/.phpunit/phpunit-6.5/vendor/composer/ClassLoader.php:322
PHP 16. include() /home/julia/Projects/webbankir/bin/.phpunit/phpunit-6.5/vendor/composer/ClassLoader.php:444

Ошибка возникает при попытке запустить тесты в консоли с помощью команды

./bin/phpunit tests

Решение

Решило проблему снижение версии, устанавливаемой библиотеки "phpunit/phpunit" до 6.5. При условии, что в директорию bin/.phpunit/... автоматом устанавливается phpunit 6.5.