Skip to content

[PHP 8.1] Access to an undefined property BackedEnum::$name #6385

@ruudk

Description

@ruudk

Bug report

Given that #6048 was closed (and updated with mentions about Enum's being supported in 1.3) I thought I was good to create a new issue for this.

Somehow PHPStan doesn't understand that you can access $name on BackedEnum.

Code snippet that reproduces the problem

https://phpstan.org/r/5b07429c-74f8-40b1-9e4f-68cd3e20f839

Expected output

No error, as the code just works on PHP 8.1

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