当前位置:网站首页>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
边栏推荐
- La loi des 10 000 heures ne fait pas de vous un maître de programmation, mais au moins un bon point de départ
- Paper notes vsalm literature review "a comprehensive survey of visual slam algorithms"
- The dynamic analysis and calculation of expressions are really delicious for flee
- How does the insurance company check hypertension?
- [leetcode] day93 - intersection of two arrays II
- Abstract learning
- Chapter 8. MapReduce production experience
- Golang operation redis: write and read hash type data
- JS date comparison
- Practice of enterprise ab/testing platform
猜你喜欢

(翻译)异步编程:Async/Await在ASP.NET中的介绍

On the practice of performance optimization and stability guarantee

机器学习 | 简单但是能提升模型效果的特征标准化方法(RobustScaler、MinMaxScaler、StandardScaler 比较和解析)

Chapter 8. MapReduce production experience

POI excel percentage

vmware虚拟机C盘扩容

Jenkins

The dynamic analysis and calculation of expressions are really delicious for flee

DBNet:具有可微分二值化的实时场景文本检测

Use the jvisualvm tool ----- tocmat to start JMX monitoring
随机推荐
利用C#实现Pdf转图片
2022年华东师范大学计科考研复试机试题-详细题解
【code】if (list != null && list.size() > 0)优化,集合判空实现方式
Laravel Web框架
“我为开源打榜狂”第一周榜单公布,160位开发者上榜
php artisan
Heap sort and priority queue
Win 10 find the port and close the port
Arctic code vault contributor
Hands on redis master-slave replication, sentinel master-slave switching, cluster sharding
vmware虚拟机C盘扩容
Numerical method for solving optimal control problem (I) -- gradient method
In depth analysis of reentrantlock fair lock and unfair lock source code implementation
机器学习 | 简单但是能提升模型效果的特征标准化方法(RobustScaler、MinMaxScaler、StandardScaler 比较和解析)
Resttemplate configuration use
Interface learning
[leetcode] day93 - intersection of two arrays II
2022-06-23 vgmp OSPF inter domain security policy NAT policy (under update)
The list of "I'm crazy about open source" was released in the first week, with 160 developers on the list
mysql误删root账户导致无法登录