Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regenerate autoload.php in symfony2

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!

like image 736
benoffi7 Avatar asked Dec 03 '13 15:12

benoffi7


1 Answers

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.

like image 77
undefined Avatar answered Oct 20 '22 09:10

undefined