Skip to content

2.1.27 Bug when overriding PHPDoc type of a protected property in a subclass #13537

@jf-m

Description

@jf-m

Bug report

Hi,

Since 2.1.27 we can't override a protected property in a subclass.
It worked on my project on 2.1.26 and below:

See the example provided

Code snippet that reproduces the problem

https://phpstan.org/r/983f594a-a257-44ea-bcac-917b096ef823

Expected output

I believe it should not report any issue in this code snippet.

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

Big thanks to the maintainer of this awesome project 🍻

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions