Symfony2: autoload/register namespaces from within a Bundle
-
26-10-2019 - |
Question
I am working on a bundle in which I use the Doctrine CouchDB ODM. How does one autoload and register the namespaces from within a bundle? Here are the relevant working lines from app/autoload.php
that I need to move:
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader->registerNamespaces(array(
// ...
'Doctrine\\CouchDB' => __DIR__.'/../vendor/doctrine-odm/lib',
'Doctrine\\ODM\\CouchDB' => __DIR__.'/../vendor/doctrine-odm/lib',
));
Thank you!
Solution
Composer was added to address this issue: http://knplabs.com/blog/symfony2-with-composer
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow