Composer – the PHP dependency manager
Inspired by
npm (https://www.npmjs.com/) and
bundler (http://bundler.io/), Composer (https://getcomposer.org/) manages the dependencies of your project and installs packages in predetermined directories (for example, vendor
) using the composer.json
file in the Magento module or theme. This kind of management is very useful once each library has your specific dependency. Composer doesn't let you waste your time by connecting the dependencies to every deployment that you want to do.
In the next chapters, we will use Composer to install components on Magento. However, first, we will start the development of our theme; it is necessary to declare our composer.json
file. For now, let's install Composer on the operating system.
Installing Composer on Unix-like operating systems
To install Composer on Unix-like systems (such as Unix, Linux, and OS X), you simply need to run these two commands in the terminal:
$ curl -s https://getcomposer.org...