Skip to content

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

@mabar

Description

@mabar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions