Composer is a cross-platform dependency manager for PHP libraries. This article will explain how to install it on OS X and add an alias so you can use it from anywhere.
The first step is to download Composer, which will effectively create a Phar (PHP Archive) file called composer.phar. From your terminal, run the following command:
curl -sS https://getcomposer.org/installer | php
In some cases, you might receive the following error: