-
-
Notifications
You must be signed in to change notification settings - Fork 708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configured PHPStan extensions unexpectly errors on 0.17.3 #8140
Comments
Rector 0.17.3 no longer magically load phpstan extension, that's on PR: by @TomasVotruba , the services need to be loaded on phpstan config, and you may can configure: $rectorConfig->phpstanConfig(__DIR__ . '/phpstan-for-rector.neon'); |
@alexander-schranz I checked, you need to add includes:
- vendor/phpstan/phpstan-doctrine/extension.neon
- vendor/phpstan/phpstan-symfony/extension.neon I created PR to sulu/skeleton repo: |
Thx for the detailed and fast response. I understand the internal issue, but currently from outside it feels really strange. Is there any way to hook into this from the Something like: $rectorConfig->phpstanConfig(__DIR__ . '/phpstan.neon');
$rectorConfig->phpstanConfigs([
'vendor/phpstan/phpstan-doctrine/extension.neon',
'vendor/phpstan/phpstan-symfony/extension.neon',
]); Want to avoid have to define some extensions in the phpstan.neon file and some are autoloaded and not really a fan of phpstan-for-rector.neon file. |
|
Move it into an own feature request where the details can be discussed: #8141 |
Thanks for the config improvement 👍 Closing as explicit extension including is the solution now: #8140 (comment) |
Bug Report
Run into the following issue:
Full Stacktrace
The version 0.17.2 seems not to run into this issue.
Minimal PHP Code Causing Issue
As the error appears it seems to be related to the
phpstan-doctrine
extension. A repository to reproduce is sulu/skeleton where doctrine and other plugins are installed:Expected Behaviour
Same as 0.17.2 it should not error with phpstan exensions.
The text was updated successfully, but these errors were encountered: