autloading not working correct using autoloader.php in vendor directory

This is kind of a shot in the dark but Symfony 2 applications include an autoload.php file which explicitly loads an annotation registry.

// autoload.php
use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;

/**
 * @var ClassLoader $loader
 */
$loader = require __DIR__.'/../vendor/autoload.php';

AnnotationRegistry::registerLoader(array($loader, 'loadClass'));

return $loader;

I never really researched why in any detail since I don't use annotations. But give it a try. Can't hurt.


This is a bit old, but I created a composer plugin which registers composer ClassLoader into the AnnotationRegistry as a loader.

https://github.com/indigophp/doctrine-annotation-autoload