Search code examples
phpsymfonycomposer-phpvendor

Symfony vendor's files have to be modified after install/update


I've a strange bug when I deploy a Symfony 2.3 project on my dedicated server (ubuntu) ;

After executing the command : sudo composer.phar update or sudo composer.phar install

All vendor's classes must be open and re-save manually, otherwise I get this error on the front :

RuntimeException: The autoloader expected class "XXX" to be defined in file "/home/YYY/ZZZ.php". The file was found but the class was not in it, the class name or namespace probably has a typo.

I replaced the class name because the problem is on ALL classes... When I touch one, the error message is about another...

Anyone has got this problem, and know how to resolve it ?


Solution

  • Damn, I just forgot the "php" before the command...

    sudo php composer.phar update