May 25, 2021 Composer
In general, is
not recommended.
The vendor directory (or any other directory on which you install it) should be
.gitignore
/
svn:ignore
/ and so on.
It's a good idea to do this and then have all developers use Composer to install the dependency package. Similarly, build servers, CI, deploy tools, and so on should be modified so that running Composer is part of its project boot.
While submitting it in some environments can be heart-tinging, it can lead to some problems:
If you really feel you have to do this, you have several options:
preferred-install
as dist in the
config
dist
.git
folder under each dependency after installation, and you can then add them to your git repo.
You can run
rm -rf vendor/**/.git
quickly, but this means that you need to delete the dependent files on the disk before you can run the composer update command.
vendor/.git
to ignore all
.git
vendor.
This method does not require you to delete dependent files from your disk before running the composer update command.