[DCOM-86] k-fish Created: 09/Dec/11  Updated: 30/Dec/11  Resolved: 30/Dec/11

Status: Closed
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Karsten Dambekalns Assignee: Fabio B. Silva
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

When parsing a class the DocParser uses class_exists() to check for annotation classes (this triggers autoloading) - only afterwards the annotation is ignored if it should be ignored.

At least for simple unqualified names the check against the ignored annotations could be done earlier. This already goes a long way:

----- DocParser.php, at about line 555 -----
// only process names which are not fully qualified, yet
// fully qualified names must start with a \
$originalName = $name;
if ('
' !== $name[0]) {
// check early and return before further inspections
if (isset($this->ignoredAnnotationNames[$name]))

{ return FALSE; }

$alias = (false === $pos = strpos($name, '
'))? $name : substr($name, 0, $pos);

----- DocParser.php, at about line 555 -----



 Comments   
Comment by Fabio B. Silva [ 30/Dec/11 ]

Other explanations : https://github.com/doctrine/common/pull/90#issuecomment-3313175

Generated at Thu Aug 21 22:14:48 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.