Skip to content

Assign readonly property value using list is not handled #7119

@niconoe-

Description

@niconoe-

Bug report

When using the list syntax or its short version to assign values to readonly properties in a constructor, the assignation is not taken into account, and this creates a false positive.

Code snippet that reproduces the problem

Here is an example of snippet that throws an error

Expected output

No error.

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

PHPStan is helping me everyday and I'll never thanks enough people who are making this better and better everyday! A huge THANK YOU!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions