Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I undo composer's dump-autoload?

Tags:

composer-php

I incorrectly issued composer dump-autoload -o on my PHP project (thinking it did something else!). Is there a way to undo this?

I found an auto-generated file in vendor/composer/autoload_real.php - will just deleting this file do the trick?

like image 295
NoChecksum Avatar asked Sep 22 '15 20:09

NoChecksum


1 Answers

Yes, manually removing all files of the autoloader in the vendor/composer/ folder should work.

So, all vendor/composer/autoload_*.php files and the include_paths.php.

By using dump-autoload -o Composer creates an optimized autoload_classmap.php file.

If in doubt, drop the whole vendor/composer folder and do a composer update afterwards. Composer will then auto-generate the files again.

like image 108
Jens A. Koch Avatar answered Dec 31 '22 19:12

Jens A. Koch