NoChecksum
NoChecksum

Reputation: 1226

Can I undo composer's dump-autoload?

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?

Upvotes: 9

Views: 8417

Answers (1)

Jens A. Koch
Jens A. Koch

Reputation: 41756

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 install afterwards. Composer will then auto-generate the files again.

Upvotes: 14

Related Questions