【问题标题】:Is it possible to exclude a package from update while using composer update?使用作曲家更新时是否可以从更新中排除包?
【发布时间】:2021-03-06 07:31:26
【问题描述】:

我正在为我的网站使用 Neos CMS。现在我正在尝试通过composer update 更新 CMS。在我的项目中,我安装了一个现在被废弃的包。这导致更新失败,因为包内的composer.json 不需要更新版本的 CMS。基本上我只需要一种在作曲家更新时完全忽略该包的方法。 --no-dev 没用。结果是:Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems. 如果有人有想法,那就太好了。

【问题讨论】:

标签: composer-php neoscms


【解决方案1】:

如果废弃包的来源仍然可用,您可以创建一个 fork,更改需求设置,然后像 How to require a fork with composer? 中所述包含您的 fork

更好的方法是用其他仍在维护的东西交换包。如果您在项目中依赖此包的功能,则可能值得自己维护它的更新分支。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-09-11
    • 2014-09-20
    • 2015-12-01
    • 2021-04-24
    • 2018-07-19
    • 2021-10-16
    • 2014-01-07
    相关资源
    最近更新 更多