Do you know what composer.lock does?

藏色散人
Release: 2020-08-24 15:24:09
forward
2355 people have browsed it

The following tutorial column ofcomposerwill introduce to you how to install Composer on Mac and how to install TP5 with Composer. I hope it will be helpful to friends in need!

Do you know what composer.lock does?

Composer download composer.lock:

When you use composer to install php components, you will find that a composer.lock file is created. What does it do? ?

composer.lock records the versions of all currently installed PHP components. If multiple people collaborate on development and need to keep the version of the downloaded PHP components to reduce unnecessary trouble, then composer.lock needs to be added to version control. , such as using git or svn, then you need to add it to version control. Otherwise, it is not used.

It should be noted that when composer install performs component dependencies, the composer.lock file will not be updated unless a new component is introduced into composer.json. If you want to update, please use composer update, which will update the component to The latest stable version will also update the composer.lock file.

The above is the detailed content of Do you know what composer.lock does?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!