Composer

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

Composer is not a package manager in the same sense as Yum or Apt are. Yes, it deals with "packages" or libraries, but it manages them on a per-project basis, installing them in a directory (e.g. vendor) inside your project. By default, it does not install anything globally. Thus, it is a dependency manager. It does however support a "global" project for convenience via the global command.

This idea is not new and Composer is strongly inspired by node's npm and ruby's bundler.

Suppose:
 * 1) You have a project that depends on a number of libraries.
 * 2) Some of those libraries depend on other libraries.

Composer:
 * 1) Enables you to declare the libraries you depend on.
 * 2) Finds out which versions of which packages can and need to be installed, and installs them (meaning it downloads them into your project).
 * 3) You can update all your dependencies in one command.
 * 4) See the Basic usage chapter for more details on declaring dependencies

Related Topic

 * Composer: Installation on Ubuntu
 * Composer: Clean Cache on Ubuntu
 * Packagist: The PHP Package Repository