English 中文(简体)
作曲家. lock: 它是如何工作的?
原标题:composer.lock: how does it work?

我试图理解这一部分:

最佳回答
问题回答

composer.lock 记录了安装的准确版本。 这样您就可以与您的同事在同一版本中 。

<强度 > composer 安装

  • Check for composer.lock file
  • If not, auto generate composer.lock file (Using composer update)
  • Install the specified versions recorded in the composer.lock file

<强 > composer 更新

  • Go through the composer.json file
  • Check availability of newer (latest) versions, based on the version criteria mentioned (e.g. 1.12.*)
  • Install the latest possible (according to above) versions
  • Update composer.lock file with installed versions

so 在一个简单的检查列表中。

如果您想要将所有同事都保留在与您相同的版本中, < enger>

  • Commit your composer.lock to GIT (or vcs you have)
  • Ask others to get the that version of composer.lock file
  • Always use composer install to get the correct dependencies

如果您想要将系统依赖性升级到新版本 , < 强>

  • Check the composer.json file for version specs.
  • Do a composer update
  • This will change the composer.lock file with newest versions
  • Commit it to the GIT (or vcs)
  • Ask others to get it and composer install

Following will be a very good reading
https://blog.engineyard.com/2014/composer-its-all-about-the-lock-file

享受 composer.lock 文件的力量!

锁定文件的要点是记录安装的准确版本, 以便可以重新安装。 这意味着, 如果您有1. * 的版本, 并且您的同僚运行了 composer 更新 更新 , 安装了1.2.4, 然后启用了撰写器 。 locker 文件 。 当您 < code>composorser 安装了 时, 您也会得到1.2.4, 即使1.3. 0 已经发布 。 这确保了在项目上工作的每个人都有相同的版本 。 read 更多 < a href="https://blog.engineyard.com/2014/comcomcomposer- it- all-about- the- lock- file" rel= " norefer" > Composer: it's All about the Lock File

运行运行中

compose init

它会解决你的问题





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...