Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with autoloaded classes that aren't namespaced and have the same name as any docblock comment #109

Open
deresh opened this issue Dec 23, 2016 · 3 comments

Comments

@deresh
Copy link

deresh commented Dec 23, 2016

I have an part of legacy application that is added in symfony and i have a problem with annitationparser.

Annotation parser finds "@author" annotation, then immediatly tries to find annotation class for this annotation.

It finds my class named "author" (it's withouth namespace), properly parses it as not annotation (annotation metadata array has "is_annotation" set to false.

But then in DocParser.php (line 749) it does additional check for "author" class and this fails, as it check if this class is in array $this->ignoredAnnotationNames (and this array is empty, it never gets set).

And AnnotationReader global ignored annotation names is checked later in code :/

@mikeSimonson
Copy link
Contributor

Can you make a failing test case ?

@deresh
Copy link
Author

deresh commented Dec 23, 2016

@mikeSimonson: Hm, not sure if i can, but will try.

I have currently fixed this by altering annotation autoloader to skip my class.

@mikeSimonson
Copy link
Contributor

@deresh can you please check if your issue is fixed in 1.3.1 ?

Thanks

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

No branches or pull requests

3 participants