Skip to content

Internal error: Failed to find parent class of constant #4288

@vworldat

Description

@vworldat

Bug report

Phpstan fails to find class constants when used as default argument value in a trait method. I have backtracked various phpstan versions. This has not been an issue up until phpstan 0.12.25, from 0.12.26 onwards it breaks on all versions i checked including the latest 0.12.58.

Code snippet that reproduces the problem

https://phpstan.org/r/c17faf82-5d21-4283-a324-b5976c6c1414

Things I have tried to make it pass:

Expected output

No errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions