Skip to content

Non-constexpr in attribute declaration not reported #7370

@dktapps

Description

@dktapps

Bug report

I don't understand why this is so, but it is... so PHPStan must report it.

Code snippet that reproduces the problem

https://phpstan.org/r/79ae566c-82a4-456e-a476-d0c2e49da31d
https://3v4l.org/PHgBl#v8.1.6

Expected output

An error should be reported on line 10, because dynamic expressions are prohibited in attribute declarations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions