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

NULL and null as a property default value are treated differently when overriding a parent property #10987

Closed
mabar opened this issue May 11, 2024 · 0 comments · Fixed by phpstan/phpstan-src#3063
Labels
Milestone

Comments

@mabar
Copy link
Contributor

mabar commented May 11, 2024

Bug report

Parent property supports only string. When default value is overriden in child, NULL is correctly reported but null is not.

Code snippet that reproduces the problem

https://phpstan.org/r/b449bcf7-6aba-4362-bb63-7ce1c6d9d0e2

Expected output

Both cases should report an error

Did PHPStan help you today? Did it make you happy in any way?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants