Speedup Composer using Prestissimo

Composer, Quick Tip

Composer is a revolution in the PHP world. You can use it to manage your dependencies. Need a specific library. Run composer require vendor/packagename and you can use it. Working on a project? Run composer install and you have all dependencies you need. There is just 1 downside with this: When a project has a lot of dependencies, it can be quite slow to download them all.

Luckily there is Prestissimo. This checks all dependencies and downloads them using multiple threads. Installing is just as simple as running composer global require hirak/prestissimo. You can check the project on Github here.

I only found one downside: Some vendors (to be specific: Mirasvit) do something unknown to me that gives me an error about a failing checksum. The solution is pretty simple:

  • Remove Prestissimo: composer global remove hirak/prestissimo.

  • Delete the vendor directory of the project: rm -rfv vendor.

  • Clear the Composer cache: composer clear-cache.

Now you should be good to go. Only a bit slower this time.