沃梦达 / 编程问答 / php问题 / 正文

如何在 Composer 中仅更改一个包的最低稳定性

How to change minimum stability for just one package in Composer(如何在 Composer 中仅更改一个包的最低稳定性)

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

问题描述

我正在尝试通过 Composer 将 ldap-auth 模块合并到我的 Laravel 项目中.但是,它仅在 dev 稳定版本中可用.我当前的 Composer.json 有一个 minimum-stability 设置为 stable,我想为我的其余模块保留它,但是当我尝试运行 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 中仅更改一个包的最低稳定性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:如何在 Composer 中仅更改一个包的最低稳定性

基础教程推荐