Skip to content

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

@dktapps

Description

@dktapps

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions