Why updating of dependencies in composer is so slow? Why updating of dependencies in composer is so slow? symfony symfony

Why updating of dependencies in composer is so slow?


Try to specify a version for each dependency in composer.json and use the option --prefer-dist when calling composer. It will download ZIP files from the repositories (if available) instead of the single files.

php composer.phar install --prefer-dist


Since you accepted an answer, it looks like that solved your problem. Just in case anybody else stumbles across this question though (like I did when I was searching), in my case, a really slow Composer install had to do with my PHP version (word of warning, I am a complete and utter Composer newbie), even though Composer ran through its standard checks and said everything was fine. I run Ubuntu 12.04 LTS and was too lazy to upgrade from the default PHP 5.3.10 (the same version you're running) in the Precise repo.

Installing Twig via Composer originally took me around 30 minutes. I gave up installing Doctrine after it took more than an hour. I upgraded to 5.4.17 (using this PPA https://launchpad.net/~ondrej/+archive/php5) and installing Doctrine was done in a matter of seconds.


I have found that it is also very slow, in the tens of minutes slow.

For me I added -vvv and found it was hanging at stuff like Downloading https://packagist.org/p/provider-active$53cdf887c8d2925b3501f47d6980fb7bda2310716369bf7a84857c6e62bbab0f.json

I then went to the browser and tried to download that JSON file and sure enough. It was packagist.org to be the cause of the slowness.