Skip to content

AnnotationRegistry fallback to class_exists doesn't seem to work #321

@ChrisTitos

Description

@ChrisTitos

I noticed in our codebase after updating to 1.10.1 and removing the deprecated registerLoader('class_exists') call that our custom annotations were not recognized anymore. Getting a "The annotation [...] was never imported. Did you maybe forget to add a "use" statement for this annotation?" error message, though there is in fact a use statement.

I thought pull request #271 would fix that, but it appears that class_exists is not called.

I think I narrowed down the cause to the registerFileUsed flag. In the AnnotationReader constructor is a call to registerFile, which means registerFileUsed is always true, which results in the class_exists fallback never being called.

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