Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between composer update and composer dump-autoload in laravel

sometime to update composer file.I use two different command composer update and composer dump-autoload.

And both those have different result in command prompt like:

C:\xampp\htdocs\rabble>composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Generating optimized class loader

And:

C:\xampp\htdocs\rabble>composer dump-autoload
Generating autoload files
like image 926
Jigs Virani Avatar asked Aug 11 '15 10:08

Jigs Virani


1 Answers

composer update always regenerates composer.lock and installs the lastest versions of available packages based on composer.json

composer dump-autoload won’t download a thing. It just regenerates the list of all classes that need to be included in the project (autoload_classmap.php). Ideal for when you have a new class inside your project

like image 61
Hitha Avatar answered Nov 14 '22 22:11

Hitha