DCOM-4: Cannot use namespace separator and namespace alias at the same time for annotations #639

doctrinebot opened this Issue May 9, 2010 · 3 comments

1 participant


Jira issue originally created by user merk:

In the function Annotation() in \Doctrine\Common\Annotations\Parser.php (~line 225)

There is a check for how many $nameParts there are, and the doctrine code will only append the namespace aliases if there are no namespace separators.

There is also an argument against modification since the user of the code could just define more namespace aliases, but I feel that it should be able to cope with a namespace alias and a namespace separator at the same time.


Comment created by @beberlei:

From our discussion on IRC, the problems here are:

  • Annotations that don't have classes don't really throw an appropriate exception (error message)
  • The \ separator inside an annotation does not throw an appropriate exception.

Comment created by merk:

Proposed solution to the namespace separators: http://github.com/merk/common/commit/b31166c6a85235e03935a4b41f5a54aa478f6c6b

I am unsure about throwing exception messages or doing anything too fancy in this area since there will be instances where other annotations are used for other purposes (phpdoc, etc) where you only want to ignore them.


Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.0.0-BETA2 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment