Sitelet https://github.com/phpstan/phpstan/issues/5091
Skip to content

Type alias imports in traits do not work #5091

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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