Reputation: 3106
I have autoload.php with this code
<?php
// autoload.php generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit8be239f5caef32db03f87bb271ed6012::getLoader();
but when I access to localhost
Fatal error: Class 'ComposerAutoloaderInit8be239f5caef32db03f87bb271ed6012' not found in /home/sebastian/Development/PHP/miciudad/vendor/autoload.php on line 10
Yesterday this work and I didn update.
If I run php composer.phar install
will it work and generate the correct autoload.php?
Thanks!
Upvotes: 13
Views: 28303
Reputation: 2101
It should. Also php composer.phar dump-autoload
should do the job.
As stated in the docs:
If you need to update the autoloader because of new classes in a classmap package for example, you can use dump-autoload to do that without having to go through an install or update.
Upvotes: 34