Composer, best thing for php
Composer is a package manager for PHP libraries. I was switched to python/django for my projects, but Composer then later Laravel really make me switch back to Php.
Composer is the command-line utility with which you install packages. Many features and concepts are inspired by npm and Bundler, so you may recognize things here and there if you are familiar with those tools. It contains a dependency solver to be able to recursively resolve inter-package dependencies, a set of downloaders, installers and other fancy things.
To install Composer, you just need to download the composer.phar executable.
curl -sS https://getcomposer.org/installer | php
To check if Composer is working, just run the PHAR through php:
This should give you a list of available commands.
Note: You can also perform the checks only without downloading Composer by using the –check option. For more information, just use –help.
curl -sS https://getcomposer.org/installer | php -- --help
To start using Composer in your project, all you need is a composer.json file. This file describes the dependencies of your project and may contain other metadata as well.
The JSON format is quite easy to write. It allows you to define nested structures.
The require Key
The first (and often only) thing you specify in composer.json is the require key. You’re simply telling Composer which packages your project depends on.
As you can see, require takes an object that maps package names (e.g. monolog/monolog) to package versions (e.g. 1.0.*).
You can continue reading the documentation.