-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
@var annotations in the view files #4486
Comments
Hi, the bug is actually the opposite of what you expect. Both |
You're absolutely correct. But, as you know, we're talking about the view templates here 😅 So as original issues regarding the view templates are – this one is weird too. I can tag other people from the original issues here to see whether they have such a problem too if you want... Pretty sure they're. |
Yeah but PHPStan's job is to tell you when your code is wrong, and in this case it is. So expect more pain stemming from this scenario, not less :) |
Fixed: phpstan/phpstan-src@4fff79c |
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. |
Bug report
@var
aboveuse
statement works correctly only when the referenced class matches the one imported inuse
. Is it possible to read alluse
statements to get the right class name? BTW, PhpStorm supports this correctly.Code snippet that reproduces the problem
https://phpstan.org/r/de78892f-e561-4b25-b54b-a8e1e0f93408
The text was updated successfully, but these errors were encountered: