phpstan/phpstan-doctrine

Unable to run rector process after upgrading to release 1.3.54

stijnh92 opened this issue · 9 comments

Hello

In our CI/CD pipeline we run some quality checks like phpstan, rector, ...
Since the upgrade from 1.3.53 to 1.3.54 of phpstan/phpstan-doctrine, our rector job is unable to execute with the following error:

 [ERROR] Interface "PHPStan\Type\ExpressionTypeResolverExtension" not found

phpstan is still running fine. Not sure why the rector job starts complaining all of the sudden.

You're somehow probably combining incompatible versions of PHPStan and phpstan-doctrine. You need at least PHPStan 1.10.47 to have this work.

My bad for not providing enough details, I am actually on PHPStan 1.10.54.
This is a part of my composer show command:

phpstan/extension-installer         1.3.1              Composer plugin for automatic installation of PHPStan extensions
phpstan/phpdoc-parser               1.25.0             PHPDoc parser with support for nullable, intersection and generic types
phpstan/phpstan                     1.10.54            PHPStan - PHP Static Analysis Tool
phpstan/phpstan-deprecation-rules   1.1.4              PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.
phpstan/phpstan-doctrine            1.3.53             Doctrine extensions for PHPStan
phpstan/phpstan-phpunit             1.3.15             PHPUnit extensions and rules for PHPStan
phpstan/phpstan-strict-rules        1.5.2              Extra strict and opinionated rules for PHPStan
phpstan/phpstan-symfony             1.3.6              Symfony Framework extensions and rules for PHPStan

This is working. Upgrading phpstan/phpstan-doctrine to 1.3.54 breaks it unfortunately.

This is a mystery. Please provide a small reproducing repository that shows the behaviour. Thanks.

I'm having same issues, I updated my dependencies today and getting this when I run rector

> rector --ansi --no-progress-bar

Fatal error: Uncaught Error: Interface "PHPStan\Type\ExpressionTypeResolverExtension" not found in /service/app/vendor/phpstan/phpstan-doctrine/src/Type/Doctrine/QueryBuilder/ReturnQueryBuilderExpressionTypeResolverExtension.php on line 23

Error: Interface "PHPStan\Type\ExpressionTypeResolverExtension" not found in /service/app/vendor/phpstan/phpstan-doctrine/src/Type/Doctrine/QueryBuilder/ReturnQueryBuilderExpressionTypeResolverExtension.php on line 23

When I downgraded phpstan-doctrine to 1.3.53, all got back to working

Besides phpstan-doctrine, only library that got updated today was phpstan, from 1.10.51 to 1.10.55

I'm having same issues

This is not helpful to say. Providing a reproduction repo would be helpful.

Hey Ondrej, I will try to set up a reproduction repo whenever I find the time. Will keep you posted.

We had the same error but only with "rector/rector": "^0.17.0". Updated rector to 0.19.x and the error is gone

@marcelthole ah thanks for letting us know, will try to upgrade rector

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.