Skip to content

@property-read error inside the class #13530

@hubipe

Description

@hubipe

Bug report

Hello,
after updating from 2.1.25 to 2.1.26 I got new errors about @property-read. PHPStan states, that the property is not writable from the inside of the class, but that is not true. The property is writable from within the class, just not writible from the outside.

I assume, that it was broken in #11241

Code snippet that reproduces the problem

https://phpstan.org/r/8861e480-1104-40f2-b85d-8badd0975def

Expected output

There should be no error

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

PHPstan saved my ass so many times! The pro version is excellent. It's a perfect tool, thanks for it.

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