-
Notifications
You must be signed in to change notification settings - Fork 93
PHPstan does not find container helper functions used on packages php configs #381
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
Comments
This is not PHPStan's fault, but Symfony's. These functions aren't discoverable by the autoloader. The root issue should be fixed in the framework. |
Thanks @ondrejmirtes , I agree that it is a SF issue 👍 Anyhow:
WDYT? |
See the release notes for PHPStan 1.6.6: https://github.com/phpstan/phpstan/releases/tag/1.6.6
Yeah, sure |
I created a PR here: #382 |
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. |
Similar (but solved) issue: #269 , where the helper functions are used in the
services.php
file.In this issue, the error is triggered when helper functions are used in a package configuration file (the ones under
config/packages/**.php
).Example:
Phpstan error:
The solution is to re-add the
scanFile
configuration to phpstan.neon, as initially documented in #271Note: that the documentation was added in b1c5152, but then removed in 94e6c34
The text was updated successfully, but these errors were encountered: