2
In fact, the directory vendor
is related to applications developed by third parties that compose the requirements of their application.
What is a 3rd Party and its importance for the development of traditional applications?
This directory has no direct relationship with Laravel, as commented in the other answer. In PHP projects this directory is quite common because it is the directory in which the Composer, PHP dependency manager, uses to organize third party codes.
The first project as an example, rktlet, uses the package management system Glide, which also defines the directory vendor
to store dependencies. The second project, ytd, seems not to use any management system, but still uses the directory vendor
by choice, following the customs of the community itself.
In short, the directory vendor
usually stores third-party project dependencies - that’s how most package managers work - but there’s no guarantee of that. Projects can exist using the directory vendor
even though this has no relation to the dependencies. I can very well store my Javascript files from my page in a directory vendor
. It works, it can only get a bit messy and therefore such a practice is not encouraged.
Cool. Can you clarify one more question? It makes sense to commit to the folder
vendor
since the Packages.json file already describes the necessary dependencies that can be installed using the package manager? For example, with Packages.json in the folder just run thenpm install
, in the case of this manager.– vinibrsl
So if you’re using a package manager, it doesn’t make sense. Since the file itself already describes all dependencies, don’t "commit" the directory
vendor
greatly reduces the payload of the application.– Woss