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

Misleading error message when overriding PHPDoc'd parent property with native typed child property #4447

Closed
dktapps opened this issue Jan 27, 2021 · 2 comments
Labels
Milestone

Comments

@dktapps
Copy link
Contributor

dktapps commented Jan 27, 2021

Bug report

I ran into this problem due to accidental incorrect overriding of a property defined in an extension stub. Therefore, I was briefly very confused why PHPStan was telling me about a PHPDoc comment that obviously did not exist at the location that the error appeared.

Code snippet that reproduces the problem

https://phpstan.org/r/b4007245-9792-4400-add7-804987901752

Expected output

The message should clarify where the @var tag is actually located, because this message is just super confusing right now.

@ondrejmirtes ondrejmirtes added this to the Easy fixes milestone Jan 28, 2021
@ondrejmirtes
Copy link
Member

I thought about this hard but it's really difficult to fix. It's going to be solved with #4281 anyway.

@github-actions
Copy link

github-actions bot commented May 1, 2021

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 May 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants