Introduction to Composer
The PHP community is a sort of divided one and there are lot of frameworks and libraries. Since there are different frameworks available, a plugin or package written for one framework cannot be used in another. So, there should be a standard way to write and install packages. Here comes Composer. Composer is a standard way to write, distribute, and install packages. Composer inspired by npm (Node Package Manager) from the node.js
ecosystem.
In fact, most developers use Composer to install the different packages they use. This is also because using Composer to install a package is convenient because packages installed through Composer can also be easily auto-loaded through Composer. We will look into auto-loading later in this chapter.
As stated before, Composer is not just a package manager, but also a dependency manager. This means if a package needs something, Composer will install those dependencies for it and it will then auto-load accordingly.