当前位置:网站首页>PHP install composer
PHP install composer
2022-07-03 06:55:00 【AquilaEAG】
composer yes PHP Used to manage dependencies (dependency) Tools for relationships . You can declare the dependent external tool library in your own project (libraries),Composer Will help you install these dependent library files .
How to be in CentOS 8 Install and use Composer:
https://www.itcoder.tech/posts/how-to-install-and-use-composer-on-centos-8/
composer How to upgrade vendor Expansion pack, ?
composer.lock The file exists under the root directory of the project , yes composer install The product of . Because the version number of everyone is generally written broadly , So different people composer install The end result of , There may be a big difference . Especially over time , Probably composer install Initialization project , Become less reliable .
therefore , This is the time ,composer.lock Documents have the meaning of their existence .composer install Orders will be followed first composer.lock Version in ( That is to say, it is a specific version number ), And then look in the composer.json Install the latest expansion packs and dependencies ( in other words , The version number may jump ). So many members work together to write php When the project is , To ensure the consistency of versions , The better plan is :
hold composer.lock Submit the file to the version Library , Executed by others composer install.
Or the vendor Directories are also submitted to the repository , Others don't have to do anything composer command .
https://newsn.net/say/composer-update-vendor.html
composer.json and composer.lock What is it and the difference ?
When we were working on the project , Always install some dependencies .composer It provides us with a lot of convenience . Direct operation composer install.
When we run composer install Will read composer.lock file , Update dependency . If composer.lock It doesn't exist or there's nothing in it , Will execute composer.json, The latest version of the file will be downloaded to vendor Directory , And then update composer.lock file .
We will all deploy the project to github On , But , When a project needs more than one person to cooperate , In order for everyone to use exactly the same dependencies as you are using . therefore , To ensure that ,composer Officially, it is suggested that composer.lock Submitted to the git On .
Whenever you update dependencies , It's all based on composer.lock, To update .
Be careful :
composer.lock File prevents you from automatically getting the latest version of dependencies . To update to the latest version , Please use composer update command , however , Don't use update command , because update The command will update all dependencies to the latest , This action is dangerous , This is likely to lead to , The latest class library conflicts with what you wrote before , Your previous code is not available .
Reproduced in :https://www.cnblogs.com/houss/p/11597396.html
边栏推荐
- C2338 Cannot format an argument. To make type T formattable provide a formatter<T> specialization:
- Know flex box
- HMS core helps baby bus show high-quality children's digital content to global developers
- Daily question brushing record (11)
- 方差迭代公式推导
- RestHighLevelClient获取某个索引的mapping
- Liang Ning: 30 lectures on brain map notes for growth thinking
- 【无标题】
- 2021 year end summary
- 【类和对象】深入浅出类和对象
猜你喜欢
第8章、MapReduce 生产经验
Daily question brushing record (11)
golang操作redis:写入、读取kv数据
The pressure of large institutions in the bear market has doubled. Will the giant whales such as gray scale, tether and micro strategy become 'giant thunder'?
Yolov1 learning notes
Practice of enterprise ab/testing platform
2022 cisp-pte (III) command execution
2022-06-23 VGMP-OSPF-域间安全策略-NAT策略(更新中)
Machine learning | simple but feature standardization methods that can improve the effect of the model (comparison and analysis of robustscaler, minmaxscaler, standardscaler)
JMeter JSON extractor extracts two parameters at the same time
随机推荐
Unit test notes
[Code] if (list! = null & list. Size() > 0) optimization, set empty judgment implementation method
Practical plug-ins in idea
How matlab modifies default settings
Realize PDF to picture conversion with C #
php artisan
JMeter test result output
How can the server set up multiple interfaces and install IIS? Tiantian gives you the answer!
SSH link remote server and local display of remote graphical interface
卡特兰数(Catalan)的应用场景
Golang operation redis: write and read kV data
MySQL installation
Architecture notes
Resttemplate configuration use
DNS forward query:
How to plan well?
golang操作redis:写入、读取kv数据
New knowledge! The virtual machine network card causes your DNS resolution to slow down
Liang Ning: 30 lectures on brain map notes for growth thinking
Practice of enterprise ab/testing platform