Managing projects with git.
When I looked into it, it seems that it is common for gitignore to ignore the vendor of the composer as shown in the URL below, so I think it would be better to include it in the management, but what are the disadvantages and disadvantages of including it?Please let me know.
Of course, the size included in the management will be larger, but we can develop it without much restriction, so I would like to know other reasons.
Composer Reintroduction - SlideShare
Currently, the version management includes vendor control, and in the production environment, we operate it in a pull format, including vendor control, but is
composer update also performed in the production environment?
I would appreciate it if you could reply to me if there are any mistakes or if this is better.php git composer
Benefits of inclusion in repository
git pulleven if there is a change in the dependent package
vendor/, it will lead to "It works on hand..."This is not limited to vendor commitments, but more files may make it harder to forget to commit.
The disadvantages listed above may be trivial depending on the environment, operation method, and preference, but I don't think the advantages are that great.If this is not a PHP tool, I think it would be better to build an environment, but if you have a PHP development and execution environment, you just have to leave composer.phar and run it...
If it's not a deployment using Git, I think it's common to consolidate
composer install into zip and distribute it.
Do you run
composer update in the production environment?
You should use
composer install instead of
Roughly speaking, the former finds and installs the latest version of the dependent package on the spot, while the latter installs the version recorded in
composer.lock.This ensures that you install a version that exactly matches your development environment.
composer install takes less time to search for packages and resolve dependencies
© 2023 OneMinuteCode. All rights reserved.