Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Annotations
-
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]))
$alias = (false === $pos = strpos($name, '
'))? $name : substr($name, 0, $pos);
----- DocParser.php, at about line 555 -----