Reputation: 130
I have Gitlab repo with CI integrated. Tests are passing in my computer but failing in Gitlab, which is throwing an error below. This had been worked till yesterday, but failing now even for the previously passed branches. Anyone has any idea?
Fatal error: Declaration of Symfony\Bundle\FrameworkBundle\Test\KernelTestCase::tearDown() must be compatible with PHPUnit\Framework\TestCase::tearDown(): void in /builds/prolocalisapp/backend/vendor/symfony/framework-bundle/Test/KernelTestCase.php on line 136
Upvotes: 1
Views: 948
Reputation: 130
Thanks everyone for your answers. I didn't have any death star version constraint. The problem was in phpunit.phar version in CI. CI always install the latest version from https://phar.phpunit.de/phpunit.phar and the version phpunit-8.0.1.phar was causing the error. I replaced the URL in .gitlab-ci.sh with an older version https://phar.phpunit.de/phpunit-7.5.2.phar which solved the problem
Upvotes: 1
Reputation: 8326
Do not use the death star version constraint to require PHPUnit, or any other dependency really, in your composer.json
file.
Upvotes: 1