[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
Security Level: All

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


@nonalias:Annot results in a php notice.

Comment by Tim Nagel [ 27/May/10 ]

Proposed tests and fix


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 Wed Dec 02 00:15:46 EST 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.