You have multiple PHP libraries, frameworks, components, and tools available to use in your project. Until a few years ago, PHP did not have a modern way of managing project dependencies. At this moment we have Composer, a flexible project that was converted into the de facto standard of dependency management.
You are probably familiar with Composer as we were using this tool all over the book to install new libraries in the vendor
folder. At this point, you will be wondering whether you should commit the dependencies of your vendor
folder. There is no quick response, but the general recommendation is no, you should not commit the vendor
folder to your repository.
The main disadvantages of committing the vendor folder can be summarized as follows:
As we told you before, not committing the vendor is the main recommendation, but if you really need to do it, here are some suggestions:
--prefer-dist
flag or set preferred-install
to dist
in your config file/vendor/**/.git
rule to your .gitignore
file18.223.33.157