Skip to content

Unresolvable type not reported on dynamic property declared in docblock #9356

@Khartir

Description

@Khartir

Bug report

When declaring a dynamic property with @property unresolved types are not reported, as they are with regular properties.

Code snippet that reproduces the problem

https://phpstan.org/r/f44f1649-3f56-4f51-be1b-1836ac46a75d

Expected output

Error report that the property has an unresolvable type.

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

I'm currently in the process of removing a lot of code after a major switch in our codebase went live. The amount of errors PHPStan has found during this process and the security it gives is incredible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions