Skip to content

Match expression does not handle remaining value: with enumerated class-string #9534

@yann-eugone

Description

@yann-eugone

Bug report

Hi everyone!

When using a class-string var, in which you are restricting the allowed classes, you cannot use this class enumeration in a match expression.

Or do I miss something ?

Code snippet that reproduces the problem

https://phpstan.org/r/a235b8a2-dec5-4bb9-8f90-2689ca040aec

Expected output

No errors!

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions