As we mentioned in Chapter 5, Microservice Development, Composer is the most-used dependency management tool; it can help us move a project from the development environment to production in the deployment process.
There are some different opinions about what the best workflow for the deployment process is, so let's look at the advantages and disadvantages of every case.
To be used on the development environment, Composer provides a section on their composer.json
, called require-dev
, and when we need to install some libraries on our application that do not need to be on production, we have to use it.
As we already know, the command to install a new library using Composer is composer require library-name
, but if we want to install a new library, such as testing libraries, debugging libraries, or any others that do not make sense on production, we can use composer require-dev library-name
instead. It will add the library to the require-dev
section and...