-1

I am using composer with a symfony project which require sonata-project/sonata-doctrine-orm-bundle and its dependencies (naturally with many other dependencies). When I update symfony 2.3.6 to 2.5.5 and my vendors turn by turn, it updates sonata doctrine orm bundle which was written using PSR-0 autoloader and now uses PSR-4.

When composer finished to update all vendors and the symfony console command cache:clear run I get an error like class Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle can not be found.

When I look around to check what could be wrong, I discovered that the file vendor/composer/autoload_psr4.php is not updated with the path. The composer.json of sonata doctrine orm admin bundle is compliant with the paths I found in my vendor directory.

Does anyone have had the same or similar issue ? I can't find anything interesting about this...

Flohw
  • 1
  • 1
  • 3
    Did you try `composer dumpautoload`? – Wouter J Nov 07 '14 at 18:16
  • I use caopifony to deploy my project on preproductions virtual machines and the deploy.rb is configured to dump autoload with the option optimized. It seems to not work, even if I run the command manually – Flohw Nov 10 '14 at 13:36
  • I tried to remove vendor/composer/* and dump autoload, but when I try to execute `app/console cache:clear` I have the same type of error with doctrine : `Class 'Doctrine\Common\Annotations\AnnotationRegistry' not found in /home/user/website/app/autoload.php on line 12` Doctrine modules ahs always worked fine ! – Flohw Nov 10 '14 at 15:06

1 Answers1

-1

Try to update composer, this was the issue I had when having problems with PSR-4 autoloading

monofone
  • 860
  • 8
  • 16