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!
app/autoload.phpand, if the bundle will be available to the public, add the info to your README.app. @alessandro1997 implies that adding toapp/autoload.phpis the only way it's done, which would explain why I haven't found any instructions!