Skip to content

Attribute class does not have the parameter target for promoted properties #10385

@darenas31415

Description

@darenas31415

Bug report

Version affected: 1.10.51 with bleeding edge

Given an attribute with property target
When the attribute is applied to a promoted property
Then PHPStan reports the attribute does not have parameter target

It seems PHPStan doesn't recognise the attribute is applied to a promoted property but instead it thinks it's function parameter.

Code snippet that reproduces the problem

https://phpstan.org/r/b407f06b-e3c6-419a-9d32-aca23a616fef

Expected output

PHPStan should not report any issues.

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