Skip to content

Use of private const not detected in an array passed as argument of an attribute #5651

@nclsHart

Description

@nclsHart

Bug report

Usage of private a constant is not detected when used in an array passed as argument of an attribute.

Code snippet that reproduces the problem

https://phpstan.org/r/b5dbbfcd-e65c-46e9-91c2-1ec286ebf51e

Expected output

No error Constant HelloWorld::BAR is unused. at line 16.

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

It help me and my team every day to catch mistakes and save us so much time in code review! Thank you so much for this amazing tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions