Closed thePanz closed 6 months ago
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 :+1:
Anyhow:
WDYT?
how was it solved
See the release notes for PHPStan 1.6.6: https://github.com/phpstan/phpstan/releases/tag/1.6.6
should we re-introduce the documentation
Yeah, sure
should we re-introduce the documentation
Yeah, sure
I created a PR here: https://github.com/phpstan/phpstan-symfony/pull/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: https://github.com/phpstan/phpstan-symfony/issues/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 https://github.com/phpstan/phpstan-symfony/pull/271Note: that the documentation was added in b1c5152, but then removed in 94e6c34