Skip to content
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

Combining @var and @phpstan-var breaks $this in tempaltes #4606

Closed
b1rdex opened this issue Feb 26, 2021 · 2 comments
Closed

Combining @var and @phpstan-var breaks $this in tempaltes #4606

b1rdex opened this issue Feb 26, 2021 · 2 comments

Comments

@b1rdex
Copy link
Contributor

b1rdex commented Feb 26, 2021

Bug report

PhpStorm doesn't support array{} notation, so I tried to add a more specific one using @phpstan-var tag. It works, but it somehow broke $this. Removing @phpstan-var list<array{stdClass, int}> $assigned line or using @var list<array{stdClass, int}> $assigned fixes the issue.

Code snippet that reproduces the problem

https://phpstan.org/r/44439bbd-02ce-40b5-9ad1-2d40b521a7a7

Expected output

@ondrejmirtes
Copy link
Member

Fixed: phpstan/phpstan-src@3186fff

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants