Fane
Fane

Reputation: 2076

Composer packages update but don't install

After doing

sudo php composer.phar update

I get the following:

Loading composer repositories with package information 
Updating dependencies (including require-dev)
Installing SOME_PACKAGE (dev-master 6fb0f62)
Cloning SOME_TOKEN
Writing lock file Generating autoload filesUpdating

But when I do sudo php composer.phar install I get

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files

Does someone have any idea on what might be happening? I have a composer.json, composer.phar and composer.lock all in the same folder.

Upvotes: 4

Views: 17921

Answers (2)

Rafael Buçard
Rafael Buçard

Reputation: 1

Check if composer.look is using a package that uses an extension not released in php.ini . After releasing the extensions use comoser install

Upvotes: 0

Wouter J
Wouter J

Reputation: 41954

What is wrong in your opinion? With composer update, composer tries to find new versions of the packages within the specified version range. When found, it updates the package. At the end, it creates a composer.lock file with all packages and details about the installed versions.

composer install only reads this composer.lock file and installs exactly the versions specified in this. Since you already have the versions specified in that lock file, nothing will happen.

composer install is very usefull on production servers and in teams, as you'll be sure you all are using exact the same version of the dependencies.

Upvotes: 3

Related Questions