Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tinamrak
Created April 27, 2021 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tinamrak/44d1c966cdb860ffd808608c583f9281 to your computer and use it in GitHub Desktop.
Save tinamrak/44d1c966cdb860ffd808608c583f9281 to your computer and use it in GitHub Desktop.
Example of composer.json for Drupal 8 patches
{
"name": "drupal/recommended-project",
"description": "Project template for Drupal 9 projects with a relocated document root",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"support": {
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
"chat": "https://www.drupal.org/node/314178"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],
"require": {
"bower-asset/jquery-simple-color": "^1.2",
"bower-asset/spectrum": "^1.8",
"composer/installers": "^1.9",
"cweagans/composer-patches": "~1.0",
"drupal/admin_toolbar": "^2.4",
"drupal/color_field": "^2.4",
"drupal/commerce": "^2.21",
"drupal/commerce_agree_terms": "1.x-dev@dev",
"drupal/commerce_shipping": "2.x-dev@dev",
"drupal/commerce_stock": "^1.0@alpha",
"drupal/commerce_stripe": "^1.0@RC",
"drupal/core-composer-scaffold": "^8.8",
"drupal/core-project-message": "^8.8",
"drupal/core-recommended": "^8.8",
"drupal/email_registration": "^1.1",
"drupal/eu_cookie_compliance": "^1.14",
"drupal/extlink": "^1.5",
"drupal/google_analytics": "^3.1",
"drupal/inline_entity_form": "^1.0@RC",
"drupal/mailgun": "^1.0",
"drupal/menu_link_attributes": "^1.1",
"drupal/metatag": "^1.15",
"drupal/paragraphs": "^1.12",
"drupal/pathauto": "^1.8",
"drupal/rabbit_hole": "^1.0@beta",
"drupal/redirect": "^1.6",
"drupal/redirect_after_login": "^2.6",
"drupal/twig_field_value": "^2.0",
"drupal/twig_tweak": "^2.8",
"drupal/xmlsitemap": "^1.0",
"drush/drush": "^10.3",
"oomphinc/composer-installers-extender": "^2.0"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "stable",
"prefer-stable": true,
"config": {
"sort-packages": true
},
"extra": {
"composer-exit-on-patch-failure": true,
"enable-patching": true,
"patchLevel": {
"drupal/core": "-p2"
},
"drupal-scaffold": {
"locations": {
"web-root": "web/"
},
"file-mapping": {
"[web-root]/sites/default/default.services.yml": false,
"[web-root]/sites/default/default.settings.php": false
}
},
"installer-types": [
"npm-asset",
"bower-asset"
],
"installer-paths": {
"web/core": [
"type:drupal-core"
],
"web/libraries/{$name}": [
"type:bower-asset",
"type:npm-asset",
"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"
],
"web/modules/custom/{$name}": [
"type:drupal-custom-module"
],
"web/profiles/custom/{$name}": [
"type:drupal-custom-profile"
],
"web/themes/custom/{$name}": [
"type:drupal-custom-theme"
]
},
"drupal-core-project-message": {
"include-keys": [
"homepage",
"support"
],
"post-create-project-cmd-message": [
"<bg=blue;fg=white> </>",
"<bg=blue;fg=white> Congratulations, you’ve installed the Drupal codebase </>",
"<bg=blue;fg=white> from the drupal/recommended-project template! </>",
"<bg=blue;fg=white> </>",
"",
"<bg=yellow;fg=black>Next steps</>:",
" * Install the site: https://www.drupal.org/docs/8/install",
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
" * Get support: https://www.drupal.org/support",
" * Get involved with the Drupal community:",
" https://www.drupal.org/getting-involved",
" * Remove the plugin that prints this message:",
" composer remove drupal/core-project-message"
]
},
"patches": {
"drupal/commerce_stripe": {
"PaymentMethodAddForm needs to implement TrustedCallbackInterface for Drupal 9 => https://www.drupal.org/project/commerce_stripe/issues/3168822": "https://www.drupal.org/files/issues/2020-10-09/PaymentMethodAddForm%20needs%20to%20implement%20TrustedCallbackInterface%20for%20Drupal%209-3168822-14.patch",
"Fixes for D9 compatability => https://www.drupal.org/project/commerce_stripe/issues/3141622": "https://www.drupal.org/files/issues/2020-05-23/fixes_for_d9_compata-3141622-6.patch"
},
"drupal/email_registration": {
"Commerce 2 Completion Registration checkout pane => https://www.drupal.org/project/email_registration/issues/2987060": "https://www.drupal.org/files/issues/2019-04-30/2987060-17.patch"
},
"drupal/commerce_agree_terms": {
"Drupal 9 support => https://www.drupal.org/project/commerce_agree_terms/issues/3197344": "https://www.drupal.org/files/issues/2021-02-08/drupal9-support.patch"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment