Skip to content

Bad resolving constant for duplicate class names #3424

@integer

Description

@integer

Bug report

I have legacy application with admin and customer section. Every section has own entry point with controllers loading and after it loads common "model classes" same for both sections. Some controllers has same name in admin and customer section.

Before 0.12.26 I have to split application into two blocks and check it separately - but this cannot profit from ResultCache.

In 0.12.26 (and .27) I can run code in one run. It's really impressive in this application! 👍 But there is a problem with constants in classes - static analysis loads constants from last class with same name and it generates false positives.

Code snippet that reproduces the problem

https://phpstan.org/r/7c762ecf-8549-475e-88e3-971be1557e55

Expected output

No errors will be great.

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