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
WARNING: You are browsing the documentation for Symfony 2.6 which is not maintained anymore. Consider upgrading your projects to Symfony 5.1.

Installing Composer

2.6 version

Installing Composer

Composer is the package manager used by modern PHP applications. Use Composer to manage dependencies in your Symfony applications and to install Symfony Components in your PHP projects.

It’s recommended to install Composer globally in your system as explained in the following sections.

Install Composer on Linux and Mac OS X

To install Composer on Linux or Mac OS X, execute the following two commands:

$ curl -sS | php
$ sudo mv composer.phar /usr/local/bin/composer


If you don’t have curl installed, you can also just download the installer file manually at and then run:

$ php installer
$ sudo mv composer.phar /usr/local/bin/composer

Install Composer on Windows

Download the installer from, execute it and follow the instructions.

Learn more

Read the Composer documentation to learn more about its usage and features.

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.