When there are already some components downloaded in vendor directory ..
What is the effect of running install on it and also when running update?

- 3,922
- 7
- 32
- 41
-
You ever get an answer on this? I was just about to post the same till I found your question. – mtpultz Dec 31 '14 at 00:12
-
1Possible duplicate of [What are the differences between composer update and composer install?](http://stackoverflow.com/questions/33052195/what-are-the-differences-between-composer-update-and-composer-install) – Organic Advocate May 20 '16 at 17:15
1 Answers
So I had the same question and this is what I found:
composer install
Checks for composer.lock and downloads/installs the dependency versions fixed within the composer.lock file, otherwise it will install the initial composer.json dependencies (essentially calling "composer update") if composer.lock is not located, which creates the composer.lock file. This would be used to initialize composer.lock otherwise only in production to install newly updated dependencies introduced by "composer update", and inserted into composer.lock.
composer update
Installs the newest dependencies specified by composer.json, and updates the composer.lock file. This would be used in dev, and after updating the dependencies the newly updated composer.lock file would be uploaded deployed and "composer install" run.
Old question, but someone will most likely find it useful, I know I would have a couple hours ago.

- 17,267
- 22
- 122
- 201