当前位置:网站首页>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
边栏推荐
- Reading notes of "learn to ask questions"
- The difference between CONDA and pip
- 这两种驱蚊成份对宝宝有害,有宝宝的家庭,选购驱蚊产品要注意
- Realize PDF to picture conversion with C #
- Basic teaching of crawler code
- Interface learning
- Software testing assignment - the next day
- IC_ EDA_ All virtual machine (rich Edition): questasim, vivado, VCs, Verdi, DC, Pt, spyglass, icc2, synthesize, innovative, ic617, mmsim, process library
- php安装swoole扩展
- The 10000 hour rule won't make you a master programmer, but at least it's a good starting point
猜你喜欢

IC_EDA_ALL虚拟机(丰富版):questasim、vivado、vcs、verdi、dc、pt、spyglass、icc2、synplify、INCISIVE、IC617、MMSIM、工艺库

Realize PDF to picture conversion with C #

New knowledge! The virtual machine network card causes your DNS resolution to slow down

2022 East China Normal University postgraduate entrance examination machine test questions - detailed solution

Yolov3 learning notes

10000小時定律不會讓你成為編程大師,但至少是個好的起點

Create your own deep learning environment with CONDA

每日刷题记录 (十一)

利用C#实现Pdf转图片

多个全局异常处理类,怎么规定执行顺序
随机推荐
Software testing learning - day 3
Personally design a highly concurrent seckill system
SSH link remote server and local display of remote graphical interface
机械观和系统观的科学思维方式各有什么特点和作用
Simple password lock
10000小時定律不會讓你成為編程大師,但至少是個好的起點
Liang Ning: 30 lectures on brain map notes for growth thinking
ssh链接远程服务器 及 远程图形化界面的本地显示
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'?
[C /vb.net] convert PDF to svg/image, svg/image to PDF
dataworks自定义函数开发环境搭建
Tool class static method calls @autowired injected service
Chapter 8. MapReduce production experience
2022 East China Normal University postgraduate entrance examination machine test questions - detailed solution
2022-06-23 VGMP-OSPF-域間安全策略-NAT策略(更新中)
Ruoyi interface permission verification
修改MySQL密码
Troubleshooting of high CPU load but low CPU usage
Arctic code vault contributor
Error c2017: illegal escape sequence