Composer is a per-project package manager for PHP. Originally released in 2011, it quickly caught up and became a favorite package manager among PHP developers. Just by looking at its GitHub statistics, we can see the project is being actively developed by the community:
Nowadays, it is an integral part of almost every popular PHP project. Installing Composer is a pretty straightforward task. Assuming we are using the fresh Ubuntu 16.10 (Yakkety Yak) installation, the following command outlines how we can install Composer:
sudo apt-get -y install composer
Running composer -v after the installation should show the output similar to the following screenshot:Â
Now that we have it installed, using Composer is quite simple. Assuming we have an existing project to which we would like to add the Twig library, we can do so just by running...