Composer不会将软件包更新为最新版本 [英] Composer is not updating package to newest version

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

问题描述

tl; dr 我无法强制Composer对其本地软件包进行最新更改。看来,该问题是由于最新更改未包含在软件包存储库中的任何版本中引起的。

我正在使用 yii2-language-picker 在我的项目中并添加了在文档中给出的说明:

I'm using yii2-language-picker in my project and have added it with instructions given in docs:

php composer.phar require --prefer-dist lajax/yii2-language-picker "1.*"

最近,扩展程序的作者已完成更改。但是,此更改不属于任何版本,因为它是最新版本发布后 1次提交。如果我没记错(我对Composer不太熟悉),这将导致Composer不会更新本地软件包-在 composer更新之后composer install 我得到的是没有任何安装或更新

Recently extension's author has made a change. However, this change is not part of any release, because it is 1 commit after latest release. If I'm not mistaken (I'm quite new to Composer), this causes Composer to not update my local package -- after composer update or composer install I'm getting Nothing to install or update.

因为最新更改不是任何发布的一部分,建议我编辑 composer.json 文件,更改 lajax / yii2-language-picker: 1。* 必填部分 lajax / yii2-language-picker: * 并发布另一个 composer更新

Because that latest change is not a part of any relase, I was suggested to edit composer.json file, change "lajax/yii2-language-picker": "1.*" in required section to "lajax/yii2-language-picker": "*" and issue another composer update.

我也完全删除了此软件包,并使用 1。* **

I have also completely removed this package and installed it again with both "1.*" and "**".

这些都没有带来任何影响。 Composer仍然声称没有安装或更新的内容。

None of these brought any effects. Composer still claims, that there is nothing to install or update.

是什么原因导致这种情况?在这种情况下,我能做些什么,还是剩下的唯一选择就是坐下来,等待软件包/存储库作者将所做的更改作为另一个版本的一部分?

What can be causing this situation? Is there anything I can do in this case, or the only option I'm left with is to sit down and wait until package / repository author will make that change part of another release?

我尝试手动更新此软件包,但是在作曲者状态之后,我得到了无本地更改,并且我很担心,一旦发布实际的软件包更新,所有这些更改都将丢失。我应该在这种情况下进行任何本地更改还是应该坐下等待?

I tried to manually update this package, but after composer status I'm getting No local changes and I'm woried, that all these changes will be lost, once actual package update will be released. Should I make any local changes in this situation or should I sit and wait?

推荐答案

可能将1. *更改为dev-master解决您的问题。

Changing 1.* to dev-master probably solves your problem.

这篇关于Composer不会将软件包更新为最新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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