Composer软件包已更新但未安装 [英] Composer packages update but don't install

查看:116
本文介绍了Composer软件包已更新但未安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

完成后

sudo php composer.phar update

我得到以下信息:

Loading composer repositories with package information 
Updating dependencies (including require-dev)
Installing SOME_PACKAGE (dev-master 6fb0f62)
Cloning SOME_TOKEN
Writing lock file Generating autoload filesUpdating

但是当我做sudo php composer.phar install我会得到

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files

有人对可能发生的事情有任何想法吗?我在同一个文件夹中都有一个composer.json, composer.phar and composer.lock.

Does someone have any idea on what might be happening? I have a composer.json, composer.phar and composer.lock all in the same folder.

推荐答案

您认为出了什么问题?使用composer update,composer尝试在指定的版本范围内查找软件包的新版本.找到后,它将更新程序包.最后,它将创建一个composer.lock文件,其中包含所有软件包以及有关已安装版本的详细信息.

What is wrong in your opinion? With composer update, composer tries to find new versions of the packages within the specified version range. When found, it updates the package. At the end, it creates a composer.lock file with all packages and details about the installed versions.

composer install仅读取此composer.lock文件,并完全安装此文件中指定的版本.由于您已经在该锁定文件中指定了版本,因此不会发生任何事情.

composer install only reads this composer.lock file and installs exactly the versions specified in this. Since you already have the versions specified in that lock file, nothing will happen.

composer install在生产服务器和团队中非常有用,因为您可以确保所有人都使用完全相同版本的依赖项.

composer install is very usefull on production servers and in teams, as you'll be sure you all are using exact the same version of the dependencies.

这篇关于Composer软件包已更新但未安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆