Skip to content

False positive report of property only written, never read since 1.10.59 #10628

@shadowhand

Description

@shadowhand

Bug report

Since version 1.10.59, we have started getting false positive reports of:

Property X is never read, only written

For example:

image

Code snippet that reproduces the problem

https://phpstan.org/r/0c676e5c-43d2-480d-955b-c258cba4fd5f

Expected output

PHPStan should not be reporting ClassNameInflector as unused, since it is clearly used. Seems to be something related to named parameters, because if I remove the class: before the usage, the error goes away.

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

We ❤️ PHPStan (most of the time 😉)

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