Switch the local patch to have Recipes functionality applied to Drupal core from the Distributions and Recipes project

Created on 21 December 2023, 11 months ago
Updated 4 January 2024, 11 months ago

Problem/Motivation

Having issues patching Drupal 10.2.0

  - Applying patches for drupal/core
    web/modules/contrib/webpatches/patches/core-drupal--10-2-x--2023-12-14--3397897-89ea95f4.patch (Issue #3397897: Add Drupal Recipes patch for Drupal core)
patch '-p2' --no-backup-if-mismatch -d '/var/www/html/test/webship/web/core' < '/var/www/html/test/webship/web/modules/contrib/webpatches/patches/core-drupal--10-2-x--2023-12-14--3397897-89ea95f4.patch'
Executing command (CWD): patch '-p2' --no-backup-if-mismatch -d '/var/www/html/test/webship/web/core' < '/var/www/html/test/webship/web/modules/contrib/webpatches/patches/core-drupal--10-2-x--2023-12-14--3397897-89ea95f4.patch'
patching file core.services.yml

Hunk #1 FAILED at 57.

1 out of 1 hunk FAILED -- saving rejects to file core.services.yml.rej

patching file lib/Drupal/Core/Config/Action/Annotation/ConfigAction.php

patching file lib/Drupal/Core/Config/Action/Attribute/ActionMethod.php

patching file lib/Drupal/Core/Config/Action/ConfigActionException.php

patching file lib/Drupal/Core/Config/Action/ConfigActionManager.php

patching file lib/Drupal/Core/Config/Action/ConfigActionPluginInterface.php

patching file lib/Drupal/Core/Config/Action/DuplicateConfigActionIdException.php

patching file lib/Drupal/Core/Config/Action/EntityMethodException.php

patching file lib/Drupal/Core/Config/Action/Exists.php

patching file lib/Drupal/Core/Config/Action/Plugin/ConfigAction/Deriver/EntityCreateDeriver.php

patching file lib/Drupal/Core/Config/Action/Plugin/ConfigAction/Deriver/EntityMethodDeriver.php

patching file lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityCreate.php

patching file lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityMethod.php

patching file lib/Drupal/Core/Config/Action/Plugin/ConfigAction/SimpleConfigUpdate.php

patching file lib/Drupal/Core/Entity/EntityDisplayBase.php

Hunk #2 succeeded at 347 (offset 8 lines).

patching file lib/Drupal/Core/Recipe/ConfigConfigurator.php

patching file lib/Drupal/Core/Recipe/ContentConfigurator.php

patching file lib/Drupal/Core/Recipe/InstallConfigurator.php

patching file lib/Drupal/Core/Recipe/Recipe.php

patching file lib/Drupal/Core/Recipe/RecipeCommand.php

patching file lib/Drupal/Core/Recipe/RecipeConfigInstaller.php

patching file lib/Drupal/Core/Recipe/RecipeConfigStorageWrapper.php

patching file lib/Drupal/Core/Recipe/RecipeConfigurator.php

patching file lib/Drupal/Core/Recipe/RecipeDiscovery.php

patching file lib/Drupal/Core/Recipe/RecipeExtensionConfigStorage.php

patching file lib/Drupal/Core/Recipe/RecipeFileException.php

patching file lib/Drupal/Core/Recipe/RecipeMissingExtensionsException.php

patching file lib/Drupal/Core/Recipe/RecipeOverrideConfigStorage.php

patching file lib/Drupal/Core/Recipe/RecipePreExistingConfigException.php

patching file lib/Drupal/Core/Recipe/RecipeRunner.php

patching file lib/Drupal/Core/Recipe/RecipeUnmetDependenciesException.php

patching file lib/Drupal/Core/Recipe/UnknownRecipeException.php

patching file modules/config/tests/config_action_duplicate_test/config_action_duplicate_test.info.yml

patching file modules/config/tests/config_action_duplicate_test/src/Plugin/ConfigAction/DuplicateConfigAction.php

patching file modules/config/tests/config_test/config/schema/config_test.schema.yml

patching file modules/config/tests/config_test/config_test.module

patching file modules/config/tests/config_test/src/ConfigActionErrorEntity/DuplicatePluralizedMethodName.php

patching file modules/config/tests/config_test/src/ConfigActionErrorEntity/DuplicatePluralizedOtherMethodName.php

patching file modules/config/tests/config_test/src/Entity/ConfigQueryTest.php

patching file modules/config/tests/config_test/src/Entity/ConfigTest.php

patching file modules/filter/src/Entity/FilterFormat.php

Hunk #2 succeeded at 162 (offset 1 line).

patching file modules/user/src/Entity/Role.php

patching file recipes/example/composer.json

patching file recipes/example/recipe.yml

patching file scripts/drupal

patching file tests/Drupal/FunctionalTests/Core/Recipe/RecipeCommandTest.php

patching file tests/Drupal/KernelTests/Core/Config/Action/ConfigActionTest.php

patching file tests/Drupal/KernelTests/Core/Recipe/RecipeDiscoveryTest.php

patching file tests/Drupal/KernelTests/Core/Recipe/RecipeRunnerTest.php

patching file tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php

patching file tests/Drupal/Tests/Core/Recipe/RecipeConfigStorageWrapperTest.php

patching file tests/fixtures/recipes/base_theme_and_views/recipe.yml

patching file tests/fixtures/recipes/config_actions/recipe.yml

patching file tests/fixtures/recipes/config_from_module/recipe.yml

patching file tests/fixtures/recipes/config_from_module_and_recipe/config/config_test.dynamic.dotted.default.yml

patching file tests/fixtures/recipes/config_from_module_and_recipe/config/config_test.system.yml

patching file tests/fixtures/recipes/config_from_module_and_recipe/recipe.yml

patching file tests/fixtures/recipes/config_wildcard/recipe.yml

patching file tests/fixtures/recipes/install_node_with_config/config/node.settings.yml

patching file tests/fixtures/recipes/install_node_with_config/config/node.type.test.yml

patching file tests/fixtures/recipes/install_node_with_config/recipe.yml

patching file tests/fixtures/recipes/install_two_modules/recipe.yml

patching file tests/fixtures/recipes/missing_extensions/recipe.yml

patching file tests/fixtures/recipes/no_extensions/recipe.yml

patching file tests/fixtures/recipes/no_name/recipe.yml

patching file tests/fixtures/recipes/no_recipe/.gitkeep

patching file tests/fixtures/recipes/recipe_include/config/node.type.another_test.yml

patching file tests/fixtures/recipes/recipe_include/recipe.yml

patching file tests/fixtures/recipes/recipe_include_missing/recipe.yml

patching file tests/fixtures/recipes/theme_with_module_dependencies/recipe.yml

patching file tests/fixtures/recipes/unmet_config_dependencies/config/node.type.test.yml

patching file tests/fixtures/recipes/unmet_config_dependencies/recipe.yml

   Could not apply patch! Skipping. The error was: Cannot apply patch web/modules/contrib/webpatches/patches/core-drupal--10-2-x--2023-12-14--3397897-89ea95f4.patch
Downloading https://packagist.org/downloads/
Downloading https://packages.drupal.org/8/downloads
[200] https://packages.drupal.org/8/downloads
[201] https://packagist.org/downloads/

In Patches.php line 331:
                                                                               
  [Exception]                                                                  
  Cannot apply patch Issue #3397897: Add Drupal Recipes patch for Drupal core  
   (web/modules/contrib/webpatches/patches/core-drupal--10-2-x--2023-12-14--3  
  397897-89ea95f4.patch)!                                                      
                                                                               

Exception trace:
  at /var/www/html/test/webship/vendor/cweagans/composer-patches/src/Patches.php:331
 cweagans\Composer\Patches->postInstall() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:206
 Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:148
 Composer\EventDispatcher\EventDispatcher->dispatchPackageEvent() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:396
 Composer\Installer\InstallationManager::Composer\Installer\{closure}() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:411
 Composer\Installer\InstallationManager->executeBatch() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:319
 Composer\Installer\InstallationManager->downloadAndExecuteBatch() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:218
 Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:804
 Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:629
 Composer\Installer->doUpdate() at phar:///usr/local/bin/composer/src/Composer/Installer.php:290
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:147
 Composer\Command\InstallCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1040
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:382
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:145
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:93
 require() at /usr/local/bin/composer:29

install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]


Exited with code exit status 1

Proposed resolution

Switch to fetch the local patch from the distributions_recipes project

    "patches": {
      "drupal/core": {
        "Switch the local patch to have Recipes functionality applied to Drupal core from the Distributions and Recipes project": 
        "https://git.drupalcode.org/project/distributions_recipes/-/raw/patch/recipe-10.2.x.patch"
      }
    }

Detailed instructions can be found a https://git.drupalcode.org/project/distributions_recipes/-/blob/1.0.x/do...

Patch core
Recipes functionality can be applied to Drupal core by applying one of the following patches. We only support (accept bugs) for the latest minor release of core.

11.x

curl https://git.drupalcode.org/project/distributions_recipes/-/raw/patch/recipe-11.x.patch | git apply

10.2.x

curl https://git.drupalcode.org/project/distributions_recipes/-/raw/patch/recipe-10.2.x.patch | git apply

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Merge request, Patch, or Commit
  • ✅ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ✅ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release notes snippet
  • ❌ Release webpatches-10.0.1

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3410330 : Switched the local patch to have Recipes functionality applied to Drupal core from the Distributions and Recipes project
    ✅ Automated functional testing coverage
📌 Task
Status

Fixed

Version

10.0

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024