Composer is a dependency management tool for PHP. It allows you to declare the code relying on the project, which will install them in your project.
Composer is not a package manager. Yes, it involves “Packages” and “Libraries”, but it is managed on the basis of each project and installs in a directory of your project (for example, vendor). It will not install anything in the whole ground by default. Therefore, this is just a dependency management.
This idea is not fresh, and Composer has been strongly inspired by Node’s NPM and Ruby’s bundler. At that time, there were no similar tools under PHP.
Composer will solve this like this:
a) You have a project relies on several libraries.
B) Some libraries are dependent on other libraries.
c) You declare what you rely on.
D) Composer finds which version of the package needs to be installed, and install them (download them into your project).