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

FN: overriding a property with a property of a different type doesn't report any error #4281

Closed
dktapps opened this issue Dec 23, 2020 · 2 comments

Comments

@dktapps
Copy link
Contributor

dktapps commented Dec 23, 2020

Bug report

https://phpstan.org/r/24066554-0a69-4a2c-9463-17d12b2958e1
https://3v4l.org/rH5Ea

Expected output

This code should report an error.

In addition, the equivalent code with PHPDoc types should also be an error, since any change to a parent property's type can result in LSP violations (since they are both read/write).

@ondrejmirtes
Copy link
Member

Implemented: phpstan/phpstan-src@0f4885a

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

No branches or pull requests

2 participants