本文介绍了如何在Composer中仅更改一个软件包的最小稳定性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Composer将模块整合到我的Laravel项目中。但是,它仅在 dev 稳定版本中可用。我当前的Composer.json将最小稳定性设置为稳定,我想保留其余的模块,但是当我尝试运行 composer update 时,出现错误,提示模块不满足最低稳定性要求。有没有一种方法可以按照其自身的最低稳定性要求单独安装该软件包?

I'm trying to incorporate the ldap-auth module into my Laravel project via Composer. However, it is only available in a dev stability version. My current Composer.json has a minimum-stability set to stable, which I'd like to keep for the rest of my modules, but when I try to run composer update, it gives an error that there is a module that does not meet the minimum stability requirements. Is there a way to install that package separately with its own minimum-stability requirement?

推荐答案

有,您只需要使用稳定性标记将该软件包列入白名单。像这样的东西:

There is, you'll just need to whitelist that package with a stability flag. Something like this:

{
"require": {
   "ccovey/ldap-auth": "1.1.*@dev",
}}

这篇关于如何在Composer中仅更改一个软件包的最小稳定性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-16 09:11