phpstan / phpstan-symfony

Symfony extension for PHPStan
MIT License
690 stars 88 forks source link

constant_hassers: false not longer working in PHPStan 1.6.3 #270

Open alexander-schranz opened 2 years ago

alexander-schranz commented 2 years ago

I have the following configured:

parameters:
    symfony:
        constant_hassers: false

Since PHPStan 1.6.3 I'm now getting:

 ------ -------------------------------------------------------------------------------------------------
  Line   src/Sulu/Bundle/HttpCacheBundle/Tests/Unit/DependencyInjection/SuluHttpCacheExtensionTest.php
 ------ -------------------------------------------------------------------------------------------------
  100    Call to method PHPUnit\Framework\Assert::assertTrue() with false will always evaluate to false.
  101    Call to method PHPUnit\Framework\Assert::assertTrue() with false will always evaluate to false.
 ------ -------------------------------------------------------------------------------------------------

Which uses has to test if a service exist: https://github.com/sulu/sulu/blob/da963682357464af6dd15de88b565c3e2bd1a70c/src/Sulu/Bundle/HttpCacheBundle/Tests/Unit/DependencyInjection/SuluHttpCacheExtensionTest.php#L100-L101

Maybe it has todo with the change in: https://github.com/phpstan/phpstan-src/commit/5c85200c977101a57a3910f1c10b872093fe5b47

VincentLanglet commented 2 years ago

I think there is no test so far about this constantHasser config. Might be worth to add some ; do you want to do it @alexander-schranz ? It might help to debug.