Skip to content

@immutable is not inherrited from extending or implemeting #7506

@BackEndTea

Description

@BackEndTea

Feature request

Modifying properties on the immutable class does cause an error. But i expected the @immutable prop to be inherrited by its children.

In my example i would've expected the assignment of a property in the B class to also cause an issue. The same should probably be the case for interfaces.

https://phpstan.org/r/bd80b15d-5af1-4d10-8f36-20968ecacd45

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

I'm loving the immutable so far.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions