我正在尝试将我的站点从D9升级到D10,我有相当多的模块要通过,而且其中大部分都有对D10稳定的版本,但其中大约有4-5只有自动生成的修补程序(我在composer.json文件中引用过)。
除了出于某种原因,当我试图更新Drupal时,composer似乎不承认本地补丁版本
如果我运行composer update -W,就会得到这样的错误
- drupal/pdf[1.1.0, ..., 1.x-dev] require drupal/core ^8 || ^9 -> found drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev] but it conflicts with your root composer.json require (^10).所以我运行composer show drupal/pdf
name : drupal/pdf
descrip. : Display PDF file in Drupal without external readers and plugins.
keywords :
versions : * 1.1.0
type : drupal-module
license : GNU General Public License v2.0 or later (GPL-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
homepage : https://www.drupal.org/project/pdf
source : [git] https://git.drupalcode.org/project/pdf.git 8.x-1.1
dist : [zip] https://ftp.drupal.org/files/projects/pdf-8.x-1.1.zip 8.x-1.1
path : /var/www/html/docroot/modules/contrib/pdf
names : drupal/pdf
support
source : https://git.drupalcode.org/project/pdf
requires
drupal/core ^8 || ^9显然,我可以看到底线似乎是它失败的地方,但我已经通过composer在本地安装了修补程序,修复了这个问题,我甚至可以看到我的本地安装文件显示
core_version_requirement: ^9.3 || ^10
除了引用这些自定义模块的D10升级补丁文件之外,还有什么需要做的吗?
发布于 2023-05-16 14:49:15
composer update是在应用补丁之前运行的,这就是为什么您的修补程序无法工作,因为它还没有看到补丁版本,因此发现了不兼容的地方。
有关如何处理此问题的信息,请参阅此链接:https://www.drupal.org/docs/develop/using-composer/using-drupals-lenient-composer-endpoint
https://drupal.stackexchange.com/questions/315756
复制相似问题