Cover of the book Symfony 5: The Fast Track

Symfony 5: The Fast Track is the best book to learn modern Symfony development, from zero to production. +300 pages in full color showing how to combine Symfony with Docker, APIs, queues & async tasks, Webpack, Single-Page Applications, etc.

Buy printed version

Composer 2 support in Symfony CLI and SymfonyCloud

Composer 2.0 is now available for testing. It has much better performance and memory usage. It also improves the way packages are downloaded to lower the time it takes to run commands like composer install or composer update.

Even if Composer 2 is not stable yet, you can already use it in your projects.

For Symfony CLI, running symfony composer checks the version of Composer used in the composer.lock file and tries to find a Composer binary named composer1 or composer2. If it fails, it falls back to the regular composer.phar or composer file names. The binary can be in the current directory or in the $PATH.

On SymfonyCloud, where composer install is ran by default, we are now using Composer version 1 or version 2 depending on the composer.lock of your project. SymfonyCloud provides Composer binaries for both versions (named composer and composer2) and uses symfony composer to automatically make the version choice. Feel free to test Composer 2 in a branch.


Login with SymfonyConnect to post a comment