[DCOM-6] Non existant namespace alias throws a PHP Notice Created: 27/May/10  Updated: 01/Sep/10  Resolved: 01/Sep/10

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.0.0-BETA2
Fix Version/s: 2.0.0-RC1

Type: Bug Priority: Major
Reporter: Tim Nagel Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

@nonalias:Annot results in a php notice.



 Comments   
Comment by Tim Nagel [ 27/May/10 ]

Proposed tests and fix

http://github.com/merk/common/commit/65e8c10b74201c39dbe291c36230205d9b08ed65

Comment by Guilherme Blanco [ 31/Aug/10 ]

In commit: http://github.com/doctrine/common/commit/ad49a676269af368563bd9a848c904b81a825622

I fixed this issue.
The validation on unexistent classes cannot be done correctly, otherwise it'd conflict with phpDoc tags.

Comment by Tim Nagel [ 31/Aug/10 ]

What will your change do if there are multiple implementations of the Reader working on entities that dont have common namespaces, but still use namespaces?

Would it not make more sense to skip something that the Reader doesnt understand, rather than throwing an error?

(For example, Symfony2's validator system might have namespaced validators, which would then cause the 'Doctrine' reader to throw an exception)

Comment by Guilherme Blanco [ 01/Sep/10 ]

Yes, you're right...

I think we'll have to silently bypass unknown aliases... this makes debug harder, but we don't have any other option. =(

Reopening it

Comment by Benjamin Eberlei [ 01/Sep/10 ]

Fixed to skip the unknown alias annotation.

Generated at Thu Jul 24 13:07:08 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.