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: Append item to property is not checked #2689
Comments
It's something specific to callables. Feel free to check out what CallableType does. Same for BooleanType. |
I think it is for all types, for example if i want to append sth to int property |
It's not for all the types. See: https://phpstan.org/r/f704bd9e-4ca4-498d-b9f6-0fe8f9a9ab6f |
The reason is defiinitely this:
|
It should complain that |
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
Array item appending to typed property is not type checked.
Code snippet that reproduces the problem
https://phpstan.org/r/82a63ef2-cce6-4936-a3d0-37fefc92d524
also when the property is boolean there is "no error" https://phpstan.org/r/b0d411ba-c345-41a5-8a76-f2cea151aa64
Expected output
sth like https://phpstan.org/r/6fca031f-be60-4ff7-855a-af488c5d64b7
The text was updated successfully, but these errors were encountered: