Skip to content

Type alias imports in traits do not work #5091

@Seldaek

Description

@Seldaek

Bug report

It appears that type aliases get resolved from the scope of the class they are used in, and not from the trait's main docblock.

Code snippet that reproduces the problem

https://phpstan.org/r/fb90214f-4b8d-4f62-87b9-1680ee2afcfa

Expected output

No error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions