我试图通过composer 2.4.1更新9.4.5站点上的Drupalmachine。~/bin/composer.phar update drupal/core "drupal/core-*" --with-all-dependencies (composer.json见下文)
首先,我可以运行它,并进入交互式问题:drupal/编码器是否更改了多个文件(439),以及我想做什么:
y - discard changes and apply the update
n - abort the update and let you manually clean things up
v - view modified files
d - view local modifications (diff)
s - stash changes and try to reapply them after the update
? - print help我试图选择“是”,但不幸的是,我遇到了一个问题,即zetacomponents/mail中的补丁86无法应用,因此更新程序崩溃。这个补丁似乎是合并,老作曲家试图在1.9.3版本中安装zetamail。我试图手动在文件上应用修补程序,但这也不起作用。
下面是对错误的更新过程中运行的简化版本。在收集补丁之后,它得到了错误消息,即补丁不适用。
Applying patches for zetacomponents/mail
https://raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch (CiviCRM Custom Patches for ZetaCompoents mail)
https://github.com/zetacomponents/Mail/pull/86.patch (Allow single quotes to be used in return path)
Could not apply patch! Skipping. The error was: Cannot apply patch https://github.com/zetacomponents/Mail/pull/86.patch
In Patches.php line 326:
Cannot apply patch Allow single quotes to be used in return path (https://github.com/zetacomponents/Mail/pull/86.patch)! 正如建议的那样,我提供了composer.json:
{
"name": "drupal-composer/drupal-project",
"description": "Project template for Drupal 8 projects with composer",
"type": "project",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "",
"role": ""
}
],
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
],
"require": {
"php": ">=7.0.8",
"civicrm/civicrm-asset-plugin": "~1.1",
"civicrm/civicrm-core": "5.49.4",
"civicrm/civicrm-drupal-8": "5.49.4",
"civicrm/civicrm-packages": "5.49.4",
"composer/installers": "^1.2",
"cweagans/composer-patches": "^1.6.5",
"drupal/admin_toolbar": "^3.0",
"drupal/civicrm_entity": "^3.0@beta",
"drupal/console": "^1.0.2",
"drupal/content_access": "^1.0@alpha",
"drupal/context": "^4.1",
"drupal/core": "^9.0.0",
"drupal/core-composer-scaffold": "^9",
"drupal/core-project-message": "^9",
"drupal/core-recommended": "^9",
"drupal/entity": "^1.2",
"drupal/honeypot": "^2.0",
"drupal/libraries": "^3.0@beta",
"drupal/role_delegation": "^1.1",
"drupal/rules": "^3.0@alpha",
"drupal/token": "^1.10",
"drupal/typed_data": "^1.0@beta",
"drupal/upgrade_status": "^3.12",
"drupal/views_aggregator": "^2.0",
"drupal/views_data_export": "^1.1",
"drupal/webform": "^6.1",
"drupal/webform_civicrm": "^6.0",
"drush/drush": "^9.7.1 | ^10.0.0",
"howtomakeaturn/pdfinfo": "1.*",
"vlucas/phpdotenv": "^4.0",
"webflo/drupal-finder": "^1.0.0",
"zaporylie/composer-drupal-optimizations": "^1.0"
},
"require-dev": {
"drupal/core-dev": "^9"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true,
"allow-plugins": {
"composer/installers": true,
"cweagans/composer-patches": true,
"civicrm/composer-compile-plugin": true,
"civicrm/composer-downloads-plugin": true,
"civicrm/civicrm-asset-plugin": true,
"drupal/console-extend-plugin": true,
"drupal/core-composer-scaffold": true,
"drupal/core-project-message": true,
"zaporylie/composer-drupal-optimizations": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"autoload": {
"classmap": [
"scripts/composer/ScriptHandler.php"
],
"files": [
"load.environment.php"
]
},
"scripts": {
"pre-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"pre-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"post-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
],
"post-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
]
},
"extra": {
"composer-exit-on-patch-failure": true,
"patchLevel": {
"drupal/core": "-p2"
},
"drupal-scaffold": {
"locations": {
"web-root": "web/"
}
},
"installer-paths": {
"web/core": [
"type:drupal-core"
],
"web/libraries/{$name}": [
"type:drupal-library"
],
"web/modules/contrib/{$name}": [
"type:drupal-module"
],
"web/profiles/contrib/{$name}": [
"type:drupal-profile"
],
"web/themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/Commands/contrib/{$name}": [
"type:drupal-drush"
]
},
"civicrm-asset": {
"path": "web/libraries/civicrm",
"url": "/libraries/civicrm",
"assets:packages": {
"+include": [
"kcfinder/**"
]
}
},
"enable-patching": "true",
"compile-whitelist": [
"civicrm/civicrm-core",
"civicrm/composer-compile-lib"
],
"compile-mode": "all"
}
}是否有方法完成更新?
发布于 2022-09-05 13:23:45
编写器补丁错误是清楚的。此项目依赖于不再应用于其基本分支或发行版的修补程序。
这个特定修补程序被合并是一年多以前的,所以你可能不需要它。任何进一步的编写器支持都需要查看composer.json文件。
您可以设置composer-exit-on-patch-failure": false,以便继续进行,但这是一个CiviCRM支持问题。
https://drupal.stackexchange.com/questions/312846
复制相似问题