Skip to content

False positive on mixed attribute usage on promoted property #10298

@RobertMe

Description

@RobertMe

Bug report

When mixing both attributes that target parameters and attributes target properties on a promoted property an (incorrect) error will be reported for the attribute targeted at properties, that it isn't targeting properties and parameters.

(Found when mixing #[SensitiveParameter] with Symfony validator constraints on a promoted property)

Code snippet that reproduces the problem

https://phpstan.org/r/302d5bf8-304b-49aa-b013-7757886fcf4c

Expected output

No errors, instead it fails on PropAttr not having property or parameter target

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