Skip to content

Cannot use constant as key in array shape #6989

@Geekimo

Description

@Geekimo

Bug report

I cannot use a constant as key in array shapes, like I would do on array type declaration.

Code snippet that reproduces the problem

https://phpstan.org/r/99c9014b-9b9c-43ad-acf2-b7a05fad80e8

Expected output

Shouldn't throw an error.

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

Everyday, it helps a lot and helps us maintain a good code quality.

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