...It allows you to declare, manage and install the libraries on which your PHP project depends. Unlike most package managers, Composer manages on a per-project basis. It installs packages or libraries in a directory (e.g. vendor) inside your project and does not install anything globally. However, for convenience it does support a "global" project via the global command.
Suppose your project depends on a number of libraries which in turn, depend on other libraries. Composer enables you to declare these libraries, finds out which versions of these packages you require, and installs them. ...