Skip to content

@beberlei /annotations_loader.php

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
'Sensio' => __DIR__.'/../vendor/bundles',
'JMS' => __DIR__.'/../vendor/bundles',
// this is a global dependency, but given the importance of autoloading in Annotations we just
// replaced one global dependency with another to get more control over the autoloading.
// For Doctrine ORM it can register its annotations with
// For any library it can register annotations with:
\Doctrine\Common\Annotations\AnnotationRegistry::registerNamespace("MyLibrary/Annotations", "/path/to/mylibrary-root");

How the \Doctrine\Common\Annotations\AnnotationRegistry itself would be autoloaded in this example?


its loaded by the universal class loader. Its just not included in the configuration here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.