-
Notifications
You must be signed in to change notification settings - Fork 93
Using consoleApplicationLoader with bin/console causes a phpstan internal error #330
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
You need to return Application, not Closure. Examples are described in the README: https://github.com/phpstan/phpstan-symfony#analysis-of-symfony-console-commands |
@ondrejmirtes So is the expectation that PHPStan will not be compatible with |
@DAcodedBEAT It doesn't mean that. It just means that your bin/console file cannot be used as consoleApplicationLoader. You must write a separate script for that. |
Okay, thanks for the clarification! |
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. |
I tried to enable
consoleApplicationLoader: bin/console
inphpstan.neon
config file and received the following error a few times for the Command classes.The contents of my bin/console is a modified version of the default Symfony console entrypoint : https://github.com/symfony/demo/blob/main/bin/console . Does anyone have any ideas of what might be wrong? Is the returned closure in the default
bin/console
code an unsupported workflow inphpstan-symfony
?The text was updated successfully, but these errors were encountered: