DCOM-14: Exclude @throws annotation from parsing. #440

Closed
doctrinebot opened this Issue Jul 21, 2010 · 4 comments

1 participant

@doctrinebot

Jira issue originally created by user obrys:

CLI doctrine tool fails when parsing entity sources (for example: doctrine orm:validate-schema) by following error:
Fatal error: Class 'throws\MemberAccessException' not found in /usr/share/php/Doctrine/Common/Annotations/Parser.php on line 272
exception 'FatalErrorException' with message 'Class 'throws\MemberAccessException' not found' in /usr/share/php/Doctrine/Common/Annotations/Parser.php:272

This error appears when @HasLifecycleCallbacks annotation is added into entity.

The solution is adding "@throws" annotation into strippedTags into Doctrine/Common/Annotations/Parser.php

@doctrinebot

Comment created by romanb:

Can you confirm that this is still a problem with the latest code?

@doctrinebot

Comment created by obrys:

I'm using the latest Doctrine2 available thru pear:

Installed packages, channel pear.doctrine-project.org:

Package Version State
DoctrineCommon 2.0.0BETA4 beta
DoctrineDBAL 2.0.0BETA3 beta
DoctrineORM 2.0.0BETA3 beta

I still have to alter Parser.php

@doctrinebot

Comment created by @guilhermeblanco:

This ticket is invalid. I added coverage to it on commit:

http://github.com/doctrine/common/commit/7e7a06e9878a1a41a72a062fa18d71d6c64a600a

Seems you have a @throws definition that is connected to the returned class, and this is then considered an annotation.

@doctrinebot

Issue was closed with resolution "Cannot Reproduce"

@doctrinebot doctrinebot added the Bug label 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