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

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


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 -----

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

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

Generated at Wed Nov 25 03:22:19 EST 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.