The use of composer.lock under composer and how to delete it

藏色散人
Release: 2021-02-10 09:41:24
forward
3880 people have browsed it

The following tutorial column of composer will introduce the use of composer.lock under composer and how to delete it. I hope it will be helpful to friends in need!

The use of composer.lock under composer and how to delete it

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

composer.lock records the versions of all currently installed PHP components. If multiple people need to keep the version of the downloaded PHP components during collaborative development 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.

No need to do otherwise.

It should be noted that when composer installmakes component dependencies, the composer.lock file will not be updated unless new components are introduced into composer.json. If you want to update Please use composer update will update the component to the latest stable version and also update the latest composer.lock file.

How to delete COMPOSER.LOCK gracefully

Refresh the composer.lock file

composer update nothing

or

composer update --lock

The above is the detailed content of The use of composer.lock under composer and how to delete it. 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
Popular Tutorials
More>
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!