当前位置:网站首页>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
边栏推荐
- instanceof
- ssh链接远程服务器 及 远程图形化界面的本地显示
- Pits encountered in the use of El checkbox group
- 2022 East China Normal University postgraduate entrance examination machine test questions - detailed solution
- New knowledge! The virtual machine network card causes your DNS resolution to slow down
- Notes on the core knowledge of Domain Driven Design DDD
- The difference between CONDA and pip
- Laravel框架 踩坑(一)
- Summary of the design and implementation of the weapon system similar to the paladin of vitality
- Hands on redis master-slave replication, sentinel master-slave switching, cluster sharding
猜你喜欢

10万奖金被瓜分,快来认识这位上榜者里的“乘风破浪的姐姐”

Create your own deep learning environment with CONDA

Pytest -- write and manage test cases

2022-06-23 VGMP-OSPF-域間安全策略-NAT策略(更新中)

SSH link remote server and local display of remote graphical interface

Asynchronous programming: async/await in asp Net

EasyExcel

My 2020 summary "don't love the past, indulge in moving forward"

Winter vacation work of software engineering practice

Selenium - by changing the window size, the width, height and length of different models will be different
随机推荐
Reading notes of "learn to ask questions"
[LeetCode]404. Sum of left leaves
C2338 Cannot format an argument. To make type T formattable provide a formatter<T> specialization:
Realize PDF to picture conversion with C #
2022 - 06 - 23 vgmp - OSPF - Inter - Domain Security Policy - nat Policy (Update)
2021 year end summary
Win 10 find the port and close the port
golang操作redis:写入、读取kv数据
保险公司怎么查高血压?
修改MySQL密码
golang操作redis:写入、读取hash类型数据
How to plan well?
Use the jvisualvm tool ----- tocmat to start JMX monitoring
centos php7.3安装redis扩展
Learning notes -- principles and comparison of k-d tree and IKD tree
Understand software testing
Architecture notes
Tool class static method calls @autowired injected service
【无标题】
Application scenarios of Catalan number