phpcomposer-php

Why is PHP Composer so slow?


Why is PHP Composer so slow when all I do is init a project with zero dependencies? Here are the commands I run:

composer init

<step through composer.json creation, define 0 zero dependencies>

composer install

Wait 3 minutes (not an exaggeration).

All composer has to do is pull in an autoloader and create /vendor, so why does it take so long? For that matter, why doesn't that step happen on composer init?

Is there a configuration option I can use to pull in a cached autloader and vendor upon init?


Solution

  • Also, disable Xdebug. Xdebug can cause Composer to take minutes even when running a command as simple as composer --version.