SymfonyDependencyInjectionTest icon indicating copy to clipboard operation
SymfonyDependencyInjectionTest copied to clipboard

Fix PHP Fatal error when installed with --prefer-lowest

Open ibousfiha opened this issue 3 years ago • 1 comments

Hi! I publish this PR to fix a PHP Fatal error I faced when I installed the bundle with php7.4 with --prefer-lowest flag The error is the following:

PHP Fatal error:  Declaration of Matthias\SymfonyConfigTest\PhpUnit\ProcessedConfigurationEqualsConstraint::evaluate($other, $description = '', $returnResult = false) must be compatible with PHPUnit\Framework\Constraint\Constraint::evaluate($other, string $description = '', bool $returnResult = false): ?bool .../vendor/matthiasnoback/symfony-config-test/PhpUnit/ProcessedConfigurationEqualsConstraint.php on line 23

as you can see, the strong typed return : ?bool is not present in https://github.com/SymfonyTest/SymfonyConfigTest/blob/4.0.1/PhpUnit/ProcessedConfigurationEqualsConstraint.php#L23 as in https://github.com/sebastianbergmann/phpunit/blob/9.5.0/src/Framework/Constraint/Constraint.php#L42

Thanks for maintaining this repo!

ibousfiha avatar Jun 01 '22 09:06 ibousfiha

Hi there, any news about this PR ?

ibousfiha avatar Oct 11 '22 09:10 ibousfiha

Hello, is this repo still maintained ?

ibousfiha avatar Aug 14 '23 22:08 ibousfiha

We are preparing for a v5 release. We have dropped PHP 7. This issue is fixed there.

To fix this issue in your own project. Just add "matthiasnoback/symfony-config-test": "^4.2.0", in your composer.json.

Nyholm avatar Nov 16 '23 09:11 Nyholm