-3

I try to update a Drupalmachine on 9.4.5 site via composer 2.4.1. ~/bin/composer.phar update drupal/core "drupal/core-*" --with-all-dependencies (see below for composer.json)

first try i can run it and get into interactive question that drupal/coder has multiple files changed (439) and what i want to do:

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

i try to choose 'yes', but unfortunately i ran into a problem that patch 86 from zetacomponents/mail can not be applied and the update crashed. This patch seemed to be merged and old composer try to install zetamail in version 1.9.3. I tried to apply the patch manually on the files, but this doesnt work either.

Here is the shortend version of the run through the update to the error. After gathering the patches it got this errormessage, that the patches doesnt apply.

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)!  

Like suggested I provide the 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"
  }
}

Is there a method to get the update done?

5
  • 2
    Please post details of the error you are asking about. There is absolutely nothing to go on here.
    – mona lisa
    Commented Sep 5, 2022 at 11:50
  • Sorry, i added a picture of the Error and edit it. I dont have more informations about the error.
    – gzwg
    Commented Sep 5, 2022 at 12:38
  • Pictures of errors are not as useful as the actual text, for searching and copying.
    – mona lisa
    Commented Sep 5, 2022 at 13:20
  • Thanks for the suggestion, i insert the text.
    – gzwg
    Commented Sep 5, 2022 at 14:18
  • I’m voting to close this question because it should be asked at civicrm.stackexchange.com.
    – mona lisa
    Commented Sep 5, 2022 at 15:34

1 Answer 1

1

The Composer Patches error is clear. This project depends on a patch that no longer applies to its base branch or release.

This particular patch was merged more than one year ago so you probably do not need it. Any further Composer support would require a look at the composer.json file.

You can set composer-exit-on-patch-failure": false so you may proceed but this is a CiviCRM support question.

1
  • Thanks, I going to try it there. Thanks for your patience!
    – gzwg
    Commented Sep 5, 2022 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.