Skip to content

readonly classes cannot be combined with #[AllowDynamicProperties] #12281

@staabm

Description

@staabm

Feature request

https://phpstan.org/r/8c643b14-e033-44b0-8891-aaddf3ffe11f should report an error

see https://3v4l.org/8HBBd (readonly class)
see https://3v4l.org/f9iEU (enum)
see https://3v4l.org/Pa80c (interface)
see https://3v4l.org/JhNEH (trait)
see https://stitcher.io/blog/readonly-classes-in-php-82#no-dynamic-properties

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

No response

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