Switch the local patch to have Recipes functionality applied to Drupal core from the Distributions and Recipes project
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3410330. --> Reported by: [rajab natshah](https://www.drupal.org/user/1414312) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Having issues patching Drupal 10.2.0 </p> <pre>&nbsp; - Applying patches for drupal/core<br>&nbsp;&nbsp;&nbsp; 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)<br>patch '-p2' --no-backup-if-mismatch -d '/var/www/html/test/webship/web/core' &lt; '/var/www/html/test/webship/web/modules/contrib/webpatches/patches/core-drupal--10-2-x--2023-12-14--3397897-89ea95f4.patch'<br>Executing command (CWD): patch '-p2' --no-backup-if-mismatch -d '/var/www/html/test/webship/web/core' &lt; '/var/www/html/test/webship/web/modules/contrib/webpatches/patches/core-drupal--10-2-x--2023-12-14--3397897-89ea95f4.patch'<br>patching file core.services.yml<br><br>Hunk #1 FAILED at 57.<br><br>1 out of 1 hunk FAILED -- saving rejects to file core.services.yml.rej<br><br>patching file lib/Drupal/Core/Config/Action/Annotation/ConfigAction.php<br><br>patching file lib/Drupal/Core/Config/Action/Attribute/ActionMethod.php<br><br>patching file lib/Drupal/Core/Config/Action/ConfigActionException.php<br><br>patching file lib/Drupal/Core/Config/Action/ConfigActionManager.php<br><br>patching file lib/Drupal/Core/Config/Action/ConfigActionPluginInterface.php<br><br>patching file lib/Drupal/Core/Config/Action/DuplicateConfigActionIdException.php<br><br>patching file lib/Drupal/Core/Config/Action/EntityMethodException.php<br><br>patching file lib/Drupal/Core/Config/Action/Exists.php<br><br>patching file lib/Drupal/Core/Config/Action/Plugin/ConfigAction/Deriver/EntityCreateDeriver.php<br><br>patching file lib/Drupal/Core/Config/Action/Plugin/ConfigAction/Deriver/EntityMethodDeriver.php<br><br>patching file lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityCreate.php<br><br>patching file lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityMethod.php<br><br>patching file lib/Drupal/Core/Config/Action/Plugin/ConfigAction/SimpleConfigUpdate.php<br><br>patching file lib/Drupal/Core/Entity/EntityDisplayBase.php<br><br>Hunk #2 succeeded at 347 (offset 8 lines).<br><br>patching file lib/Drupal/Core/Recipe/ConfigConfigurator.php<br><br>patching file lib/Drupal/Core/Recipe/ContentConfigurator.php<br><br>patching file lib/Drupal/Core/Recipe/InstallConfigurator.php<br><br>patching file lib/Drupal/Core/Recipe/Recipe.php<br><br>patching file lib/Drupal/Core/Recipe/RecipeCommand.php<br><br>patching file lib/Drupal/Core/Recipe/RecipeConfigInstaller.php<br><br>patching file lib/Drupal/Core/Recipe/RecipeConfigStorageWrapper.php<br><br>patching file lib/Drupal/Core/Recipe/RecipeConfigurator.php<br><br>patching file lib/Drupal/Core/Recipe/RecipeDiscovery.php<br><br>patching file lib/Drupal/Core/Recipe/RecipeExtensionConfigStorage.php<br><br>patching file lib/Drupal/Core/Recipe/RecipeFileException.php<br><br>patching file lib/Drupal/Core/Recipe/RecipeMissingExtensionsException.php<br><br>patching file lib/Drupal/Core/Recipe/RecipeOverrideConfigStorage.php<br><br>patching file lib/Drupal/Core/Recipe/RecipePreExistingConfigException.php<br><br>patching file lib/Drupal/Core/Recipe/RecipeRunner.php<br><br>patching file lib/Drupal/Core/Recipe/RecipeUnmetDependenciesException.php<br><br>patching file lib/Drupal/Core/Recipe/UnknownRecipeException.php<br><br>patching file modules/config/tests/config_action_duplicate_test/config_action_duplicate_test.info.yml<br><br>patching file modules/config/tests/config_action_duplicate_test/src/Plugin/ConfigAction/DuplicateConfigAction.php<br><br>patching file modules/config/tests/config_test/config/schema/config_test.schema.yml<br><br>patching file modules/config/tests/config_test/config_test.module<br><br>patching file modules/config/tests/config_test/src/ConfigActionErrorEntity/DuplicatePluralizedMethodName.php<br><br>patching file modules/config/tests/config_test/src/ConfigActionErrorEntity/DuplicatePluralizedOtherMethodName.php<br><br>patching file modules/config/tests/config_test/src/Entity/ConfigQueryTest.php<br><br>patching file modules/config/tests/config_test/src/Entity/ConfigTest.php<br><br>patching file modules/filter/src/Entity/FilterFormat.php<br><br>Hunk #2 succeeded at 162 (offset 1 line).<br><br>patching file modules/user/src/Entity/Role.php<br><br>patching file recipes/example/composer.json<br><br>patching file recipes/example/recipe.yml<br><br>patching file scripts/drupal<br><br>patching file tests/Drupal/FunctionalTests/Core/Recipe/RecipeCommandTest.php<br><br>patching file tests/Drupal/KernelTests/Core/Config/Action/ConfigActionTest.php<br><br>patching file tests/Drupal/KernelTests/Core/Recipe/RecipeDiscoveryTest.php<br><br>patching file tests/Drupal/KernelTests/Core/Recipe/RecipeRunnerTest.php<br><br>patching file tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php<br><br>patching file tests/Drupal/Tests/Core/Recipe/RecipeConfigStorageWrapperTest.php<br><br>patching file tests/fixtures/recipes/base_theme_and_views/recipe.yml<br><br>patching file tests/fixtures/recipes/config_actions/recipe.yml<br><br>patching file tests/fixtures/recipes/config_from_module/recipe.yml<br><br>patching file tests/fixtures/recipes/config_from_module_and_recipe/config/config_test.dynamic.dotted.default.yml<br><br>patching file tests/fixtures/recipes/config_from_module_and_recipe/config/config_test.system.yml<br><br>patching file tests/fixtures/recipes/config_from_module_and_recipe/recipe.yml<br><br>patching file tests/fixtures/recipes/config_wildcard/recipe.yml<br><br>patching file tests/fixtures/recipes/install_node_with_config/config/node.settings.yml<br><br>patching file tests/fixtures/recipes/install_node_with_config/config/node.type.test.yml<br><br>patching file tests/fixtures/recipes/install_node_with_config/recipe.yml<br><br>patching file tests/fixtures/recipes/install_two_modules/recipe.yml<br><br>patching file tests/fixtures/recipes/missing_extensions/recipe.yml<br><br>patching file tests/fixtures/recipes/no_extensions/recipe.yml<br><br>patching file tests/fixtures/recipes/no_name/recipe.yml<br><br>patching file tests/fixtures/recipes/no_recipe/.gitkeep<br><br>patching file tests/fixtures/recipes/recipe_include/config/node.type.another_test.yml<br><br>patching file tests/fixtures/recipes/recipe_include/recipe.yml<br><br>patching file tests/fixtures/recipes/recipe_include_missing/recipe.yml<br><br>patching file tests/fixtures/recipes/theme_with_module_dependencies/recipe.yml<br><br>patching file tests/fixtures/recipes/unmet_config_dependencies/config/node.type.test.yml<br><br>patching file tests/fixtures/recipes/unmet_config_dependencies/recipe.yml<br><br>&nbsp;&nbsp; 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<br>Downloading https://packagist.org/downloads/<br>Downloading https://packages.drupal.org/8/downloads<br>[200] https://packages.drupal.org/8/downloads<br>[201] https://packagist.org/downloads/<br><br>In Patches.php line 331:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp; [Exception]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br>Exception trace:<br>&nbsp; at /var/www/html/test/webship/vendor/cweagans/composer-patches/src/Patches.php:331<br> cweagans\Composer\Patches-&gt;postInstall() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:206<br> Composer\EventDispatcher\EventDispatcher-&gt;doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:148<br> Composer\EventDispatcher\EventDispatcher-&gt;dispatchPackageEvent() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:396<br> Composer\Installer\InstallationManager::Composer\Installer\{closure}() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:411<br> Composer\Installer\InstallationManager-&gt;executeBatch() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:319<br> Composer\Installer\InstallationManager-&gt;downloadAndExecuteBatch() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:218<br> Composer\Installer\InstallationManager-&gt;execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:804<br> Composer\Installer-&gt;doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:629<br> Composer\Installer-&gt;doUpdate() at phar:///usr/local/bin/composer/src/Composer/Installer.php:290<br> Composer\Installer-&gt;run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:147<br> Composer\Command\InstallCommand-&gt;execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298<br> Symfony\Component\Console\Command\Command-&gt;run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1040<br> Symfony\Component\Console\Application-&gt;doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:301<br> Symfony\Component\Console\Application-&gt;doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:382<br> Composer\Console\Application-&gt;doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171<br> Symfony\Component\Console\Application-&gt;run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:145<br> Composer\Console\Application-&gt;run() at phar:///usr/local/bin/composer/bin/composer:93<br> require() at /usr/local/bin/composer:29<br><br>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] [--] [&lt;packages&gt;...]<br><br><br>Exited with code exit status 1</pre><h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Switch to fetch the local patch from the <code>distributions_recipes</code> project</p> <pre>&nbsp;&nbsp;&nbsp; "patches": {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "drupal/core": {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Switch the local patch to have Recipes functionality applied to Drupal core from the Distributions and Recipes project": <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "https://git.drupalcode.org/project/distributions_recipes/-/raw/patch/recipe-10.2.x.patch"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }</pre><p>Detailed instructions can be found a <a href="https://git.drupalcode.org/project/distributions_recipes/-/blob/1.0.x/docs/getting_started.md">https://git.drupalcode.org/project/distributions_recipes/-/blob/1.0.x/docs/getting_started.md</a></p> <p><strong>Patch core</strong><br> 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.</p> <p><strong>11.x</strong></p> <pre>curl https://git.drupalcode.org/project/distributions_recipes/-/raw/patch/recipe-11.x.patch | git apply</pre><p><strong>10.2.x</strong></p> <pre>curl https://git.drupalcode.org/project/distributions_recipes/-/raw/patch/recipe-10.2.x.patch | git apply</pre><h3 id="summary-remaining-tasks">Remaining tasks</h3> <ul> <li>&#9989; File an issue</li> <li>&#9989; Addition/Change/Update/Fix</li> <li>&#9989; Merge request, Patch, or Commit</li> <li>&#9989; Testing to ensure no regression</li> <li>&#10134; Automated unit testing coverage</li> <li>&#9989; Automated functional testing coverage<br><br> <a href="https://app.circleci.com/pipelines/github/webship/webship/103/workflows/9823c08d-dbb0-4ef7-a054-694c02e9b100/jobs/125" rel="nofollow"><img src="https://www.drupal.org/files/issues/2022-05-21/circleci-passed.png" alt="Build passing"></a> </li> <li>&#10134; UX/UI designer responsibilities</li> <li>&#10134; Readability</li> <li>&#10134; Accessibility</li> <li>&#10134; Performance</li> <li>&#10134; Security</li> <li>&#10134; Documentation</li> <li>&#9989; Code review by maintainers</li> <li>&#9989; Full testing and approval</li> <li>&#9989; Credit contributors</li> <li>&#9989; Review with the product owner</li> <li>&#9989; Release notes snippet</li> <li>&#10060; Release <strong><a href="https://www.drupal.org/project/webpatches/releases/10.0.1">webpatches-10.0.1</a></strong></li> </ul> <h3 id="summary-ui-changes">User interface changes</h3> <ul> <li>N/A</li> </ul> <h3 id="summary-api-changes">API changes</h3> <ul> <li>N/A</li> </ul> <h3 id="summary-data-model-changes">Data model changes</h3> <ul> <li>N/A</li> </ul> <h3 id="summary-release-notes">Release notes snippet</h3> <ul> <li>Issue <a href="https://www.drupal.org/i/3410330">#3410330</a>: Switched the local patch to have <strong>Recipes functionality</strong> applied to <code>Drupal core</code> from the <strong>Distributions and Recipes</strong> project<br><br> &#9989; Automated functional testing coverage<br><br> <a href="https://app.circleci.com/pipelines/github/webship/webship/103/workflows/9823c08d-dbb0-4ef7-a054-694c02e9b100/jobs/125" rel="nofollow"><img src="https://www.drupal.org/files/issues/2022-05-21/circleci-passed.png" alt="Build passing"></a> </li> </ul>
issue