Hey guys!
One of my current pain points is the requirement that you must import an
annotation namespace into each class that needs them. What makes this
especially hard is that my IDE can't help me, since the import doesn't refer
to a real class (but rather a namespace).
So, would it be possible to globally import namespaces? I understand that
the developer must control the namespace to avoid collisions, but what about
doing this application-wide?
It appears that it's almost possible, since the annotation reader has an
array of global imports. A collection of statements similar to the following
in autoload.php (assuming the addGlobalImports method were implemented),
should do the trick. I'd like to see this in the standard edition:
use \Doctrine\Common\Annotations\AnnotationReader;
AnnotationReader::addGlobalImports('ORM', 'Doctrine\ORM\Mapping');
Thoughts?
Ryan Weaver
US Office Head & Trainer - KnpLabs - Nashville, TN
http://www.knplabs.com <http://www.knplabs.com/en>
http://www.thatsquality.com
Twitter: @weaverryan
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en