当前位置:网站首页>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
边栏推荐
- 每日刷题记录 (十一)
- Winter vacation work of software engineering practice
- 【开源项目推荐-ColugoMum】这群本科生基于国产深度学习框架PaddlePadddle开源了零售行业解决方案
- Summary of the design and implementation of the weapon system similar to the paladin of vitality
- Personally design a highly concurrent seckill system
- In depth analysis of reentrantlock fair lock and unfair lock source code implementation
- Pytorch exercise items
- Climb movie paradise 2021 hot
- Pits encountered in the use of El checkbox group
- SSH link remote server and local display of remote graphical interface
猜你喜欢

Software testing learning - the next day

Daily question brushing record (11)

golang操作redis:写入、读取hash类型数据

2022年华东师范大学计科考研复试机试题-详细题解

Create your own deep learning environment with CONDA

EasyExcel

Asynchronous programming: async/await in asp Net

Arctic code vault contributor

多个全局异常处理类,怎么规定执行顺序

Personally design a highly concurrent seckill system
随机推荐
Integration test practice (1) theoretical basis
The essence of interview
Laravel Web框架
The list of "I'm crazy about open source" was released in the first week, with 160 developers on the list
Golang operation redis: write and read kV data
Tool class static method calls @autowired injected service
How can I split a string at the first occurrence of “-” (minus sign) into two $vars with PHP?
SSH link remote server and local display of remote graphical interface
SQL implementation merges multiple rows of records into one row
Condition annotation in uni-app realizes cross segment compatibility, navigation jump and parameter transfer, component creation and use, and life cycle function
Know flex box
How to plan well?
机器学习 | 简单但是能提升模型效果的特征标准化方法(RobustScaler、MinMaxScaler、StandardScaler 比较和解析)
mongodb
My 2020 summary "don't love the past, indulge in moving forward"
New knowledge! The virtual machine network card causes your DNS resolution to slow down
2022-06-23 vgmp OSPF inter domain security policy NAT policy (under update)
服务器如何设置多界面和装IIS呢?甜甜给你解答!
Pits encountered in the use of El checkbox group
[leetcode] day93 - intersection of two arrays II