Skip to content

Parameter #1 $name of attribute class Table constructor expects string|null, mixed given. Level 10 #12011

@kaskader201

Description

@kaskader201

Bug report

Passing input to Attribute using a typed constant does not work. Respectively, the type is not passed and phpstan thinks it is mixed.

Code snippet that reproduces the problem

https://phpstan.org/r/3fd2ee12-5d4d-4681-8e31-44f650ad82db

Expected output

In my opinion, this style of using a typed constant should be valid

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

No response

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