Doctrine Project

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Doctrine Common
  • Doctrine Common
  • DCOM-86

k-fish

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major 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]))

{ return FALSE; }

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

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

Activity

  • All
  • Comments
  • History
  • Activity
  • Source
Hide
Permalink
Fabio B. Silva added a comment - 30/Dec/11 2:44 PM

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

Show
Fabio B. Silva added a comment - 30/Dec/11 2:44 PM Other explanations : https://github.com/doctrine/common/pull/90#issuecomment-3313175

People

  • Assignee:
    Fabio B. Silva
    Reporter:
    Karsten Dambekalns
Vote (0)
Watch (0)

Dates

  • Created:
    09/Dec/11 1:09 PM
    Updated:
    30/Dec/11 2:44 PM
    Resolved:
    30/Dec/11 2:44 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Doctrine Project. Try JIRA - bug tracking software for your team.