Skip to content

Instantly share code, notes, and snippets.

@pthurmond
Last active July 26, 2022 20:44
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 pthurmond/392a49854f7b3edd68b25a72751baf08 to your computer and use it in GitHub Desktop.
Save pthurmond/392a49854f7b3edd68b25a72751baf08 to your computer and use it in GitHub Desktop.
Example of a Drupal 8 composer file with patches
# Ignore directories generated by Composer
/drush/Commands/contrib/
/vendor/
/docroot/core/
/docroot/modules/contrib/
/docroot/themes/contrib/
/docroot/profiles/contrib/
/docroot/libraries/
/docroot/README.md
# Ignore sensitive and environment-specific information
/docroot/sites/default/settings.php
/docroot/sites/*/settings.docksal.php
/docroot/sites/*/settings.local.php
# Ignore Drupal's file directory
/docroot/sites/*/files/
/private
# Ignore robots.txt since it's generated by the robotstxt Drupal module
/docroot/robots.txt
# Ignore Drupal scaffold files
/docroot/sites/default/default.settings.php
/docroot/.htaccess
/docroot/.csslintrc
/docroot/.editorconfig
/docroot/.eslintignore
/docroot/.eslintrc.json
/docroot/.gitattributes
/docroot/.ht.router.php
/docroot/web.config
# Ignore database backup/dump folder
/database_backups/
# Ignore SimpleTest multi-site environment.
/docroot/sites/simpletest
# Ignore files generated by PhpStorm
/.idea/
# Ignore .env files as they are personal
/.env
# Ignore any node modules directories
node_modules
# Ignore any generated theme files
/docroot/themes/custom/*/css/
/docroot/themes/custom/*/fonts/icons
/docroot/themes/custom/*/icons/
/docroot/themes/custom/*/images/
/docroot/themes/custom/*/favicons/
/docroot/themes/custom/*/js/
/source/themes/custom/*/styles/vendor/_icons.scss
# Ignore docksal kit commands
/.docksal/commands/kit
# FOR TESTING PURPOSES ONLY
/docroot/themes/custom/biplane/
/docroot/themes/custom/blackbird/
/docroot/themes/custom/blackbirdtheme/
/source/themes/custom/biplane/
/source/themes/custom/blackbird/
/source/themes/custom/blackbirdtheme/
# .DSStore files
.DS_Store
config/.DS_Store
docroot/.DS_Store
docroot/themes/.DS_Store
docroot/themes/custom/.DS_Store
source/.DS_Store
source/themes/.DS_Store
source/themes/custom/.DS_Store
{
"name": "vmlyr-drupal/kit",
"description": "Project template for VMLY&R Drupal 8 projects with composer.",
"type": "project",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Garrett Rathbone",
"role": "Technology Specialist"
}
],
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "package",
"package": {
"name": "dinbror/blazy",
"version": "1.8.2",
"type": "drupal-library",
"dist": {
"url": "https://github.com/dinbror/blazy/archive/1.8.2.zip",
"type": "zip"
}
}
},
{
"type": "package",
"package": {
"name": "furf/jquery-ui-touch-punch",
"version": "1.0",
"type": "drupal-library",
"dist": {
"url": "https://github.com/furf/jquery-ui-touch-punch/archive/refs/heads/master.zip",
"type": "zip"
}
}
}
],
"require": {
"php": ">=7.1",
"composer/installers": "^1.9",
"cweagans/composer-patches": "^1.7",
"dinbror/blazy": "^1.8",
"drupal/acquia_connector": "^3.0",
"drupal/acquia_purge": "^1.2",
"drupal/acquia_search": "^3.0.0",
"drupal/address": "^1.10",
"drupal/admin_toolbar": "^3.0",
"drupal/advagg": "^4.0",
"drupal/allowed_formats": "^1.4",
"drupal/better_exposed_filters": "^5.0@beta",
"drupal/bg_image_formatter": "^1.2",
"drupal/blazy": "^2.2",
"drupal/block_class": "^1.1",
"drupal/block_field": "^1.0@alpha",
"drupal/classy_paragraphs": "^1.0-rc1",
"drupal/color_field": "^2.4",
"drupal/config_export_ignore": "^1.1",
"drupal/config_ignore": "^2.0",
"drupal/config_split": "^1.0",
"drupal/config_update": "1.7",
"drupal/core-composer-scaffold": "^9.3.4",
"drupal/core-dev": "^9.3.4",
"drupal/core-project-message": "^9.3.4",
"drupal/core-recommended": "^9.3.4",
"drupal/core-vendor-hardening": "^9.3.4",
"drupal/current_page_crumb": "^1.2",
"drupal/devel": "^4.1",
"drupal/devel_entity_updates": "^3.0",
"drupal/devel_php": "^1.0",
"drupal/diff": "^1.0@RC",
"drupal/editor_file": "^1.0",
"drupal/email_registration": "^1.0@RC",
"drupal/entity_clone": "^1.0@beta",
"drupal/entity_reference_revisions": "^1.9",
"drupal/environment_indicator": "^4.0",
"drupal/extlink": "^1.6",
"drupal/field_group": "^3.0",
"drupal/field_group_settings": "^3.0",
"drupal/field_label": "^1.0",
"drupal/field_states_ui": "^2.0",
"drupal/file_mdm": "^2.4",
"drupal/focal_point": "^1.5",
"drupal/google_tag": "^1.3",
"drupal/image_effects": "^3.1",
"drupal/imageapi_optimize": "^4.0@beta",
"drupal/imageapi_optimize_resmushit": "^2.0@beta",
"drupal/imageapi_optimize_webp": "^2.0@beta",
"drupal/layout_paragraphs": "^1.0@beta",
"drupal/limited_field_widgets": "^2.0",
"drupal/link_class": "^1.0",
"drupal/linkit": "^5.0@beta",
"drupal/login_emailusername": "^1.1",
"drupal/media_responsive_thumbnail": "^1.0",
"drupal/media_video_micromodal": "^1.0.5",
"drupal/memcache": "^2.0@alpha",
"drupal/menu_link_attributes": "^1.0",
"drupal/menu_trail_by_path": "^1.0",
"drupal/metatag": "^1.19",
"drupal/metatag_async_widget": "^1.0@alpha",
"drupal/migrate_plus": "^5.1",
"drupal/migrate_tools": "^5.0",
"drupal/module_filter": "^3.2",
"drupal/node_view_permissions": "^1.5",
"drupal/paragraphs": "^1.x-dev",
"drupal/paragraphs_ee": "1.x-dev@dev",
"drupal/path_redirect_import": "1.x-dev",
"drupal/pathauto": "^1.6",
"drupal/permissions_filter": "^1.0",
"drupal/purge": "^3.2",
"drupal/purge_purger_http": "^1.0",
"drupal/quick_node_clone": "^1.14",
"drupal/recaptcha": "^3.0",
"drupal/redirect": "^1.0",
"drupal/robotstxt": "^1.3",
"drupal/schema_metatag": "^2.1",
"drupal/search_api": "^1.23",
"drupal/search_api_solr": "^4.2.7",
"drupal/selective_better_exposed_filters": "^2.0@beta",
"drupal/shield": "^1.0",
"drupal/simple_sitemap": "^3.3",
"drupal/smart_trim": "^1.1",
"drupal/stage_file_proxy": "^1.0@alpha",
"drupal/structure_sync": "^2.0",
"drupal/svg_image": "^1.8",
"drupal/swiftmailer": "2.x-dev",
"drupal/telephone_formatter": "^1.0@beta",
"drupal/telephone_validation": "^2.1",
"drupal/theme_filter": "^1.0",
"drupal/token": "^1.1",
"drupal/twig_tweak": "^3.1",
"drupal/ultimate_cron": "^2.0@alpha",
"drupal/video_embed_field": "^2.0",
"drupal/views_data_export": "^1.1",
"drupal/viewsreference": "^2.0@alpha",
"drupal/viewsreference_filter": "^1.0.3",
"drupal/webform": "^6.0",
"drupal/webform_mailchimp": "^5.9",
"drush/drush": "^10.3",
"facebook/graph-sdk": "^5.7",
"furf/jquery-ui-touch-punch": "^1.0",
"league/flysystem-sftp": "^2.0",
"topfloor/composer-cleanup-vcs-dirs": "^1.1",
"vlucas/phpdotenv": "^5.3",
"vmlyr-drupal/bazo": "^8.0",
"vmlyr-drupal/biplane": "^8.0",
"vmlyr-drupal/blackbird": "^8.0",
"vmlyr-drupal/kit-docksal-commands": "dev-8.x-2.x",
"webflo/drupal-finder": "^1.2"
},
"require-dev": {
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"COMPOSER_MIRROR_PATH_REPOS": true,
"discard-changes": true,
"sort-packages": true,
"platform": {
"php": "7.4"
}
},
"autoload": {
"classmap": [
"scripts/composer/ScriptHandler.php",
"scripts/composer/KitScriptHandler.php"
],
"files": ["load.environment.php"]
},
"scripts": {
"drupal:scaffold-kit": "DrupalProject\\composer\\KitScriptHandler::scaffold",
"post-drupal-scaffold-cmd": [
"@composer drupal:scaffold-kit",
"patch --no-backup-if-mismatch -p1 < patches/htaccess.patch"
],
"pre-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"pre-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
]
},
"extra": {
"composer-exit-on-patch-failure": false,
"drupal-scaffold": {
"file-mapping": {
"[web-root]/.ht.router.php": false,
"[web-root]/example.gitignore": false,
"[web-root]/INSTALL.txt": false,
"[web-root]/README.txt": false,
"[web-root]/robots.txt": false,
"[web-root]/web.config": false,
"[web-root]/sites/development.services.yml": {
"mode": "replace",
"path": "scripts/scaffold/development.services.yml",
"overwrite": false
},
"[web-root]/sites/example.settings.docksal.php": {
"mode": "replace",
"path": "scripts/scaffold/example.settings.docksal.php",
"overwrite": false
},
"[web-root]/sites/example.settings.local.php": {
"append": "scripts/scaffold/example.settings.local.php--append.txt"
},
"[web-root]/sites/README.txt": false,
"[web-root]/sites/default/default.settings.php": {
"append": "scripts/scaffold/default.settings.php--append.txt"
},
"[web-root]/sites/default/settings.php": false,
"[web-root]/modules/README.txt": false,
"[web-root]/profiles/README.txt": false,
"[web-root]/themes/README.txt": false
},
"gitignore": false,
"locations": {
"web-root": "docroot/",
"config-root": "config/"
}
},
"installer-types": [
"bower-asset",
"npm-asset"
],
"installer-paths": {
".docksal/commands/kit": [
"vmlyr-drupal/kit-docksal-commands"
],
"docroot/core": [
"type:drupal-core"
],
"docroot/libraries/{$name}": [
"type:drupal-library",
"type:bower-asset",
"type:npm-asset"
],
"docroot/modules/contrib/{$name}": [
"type:drupal-module"
],
"docroot/profiles/contrib/{$name}": [
"type:drupal-profile"
],
"docroot/themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/Commands/contrib/{$name}": [
"type:drupal-drush"
]
},
"patches": {
"drupal/classy_paragraphs": {
"https://www.drupal.org/node/2830403": "https://www.drupal.org/files/issues/2021-02-23/choose_and_order-2830403-44.patch"
},
"drupal/core": {
"https://www.drupal.org/node/1091852": "https://www.drupal.org/files/issues/2021-11-05/1091852-150.patch",
"https://www.drupal.org/node/2429699": "https://www.drupal.org/files/issues/2020-10-25/drupal-views-entity-reference-filter-2429699-369.patch",
"https://www.drupal.org/node/2516938": "https://www.drupal.org/files/issues/2020-06-09/core-toolbar-mobile-2516938-73.patch",
"https://www.drupal.org/node/2642122": "https://www.drupal.org/files/issues/2021-07-12/2642122-141.patch",
"https://www.drupal.org/node/2827921": "https://www.drupal.org/files/issues/2827921-remove-missing-responsive-image-width-exception.patch",
"https://www.drupal.org/project/drupal/issues/2663316": "https://www.drupal.org/files/issues/2019-10-21/2663316-76.drupal.Broken-title-in-modal-dialog-when-title-is-a-render-array.patch",
"https://www.drupal.org/node/3006729": "https://www.drupal.org/files/issues/2022-07-08/3006729-21.patch",
"https://www.drupal.org/node/3188588": "https://www.drupal.org/files/issues/2020-12-15/3188588-02.patch"
},
"drupal/field_group": {
"https://www.drupal.org/node/3059614": "https://www.drupal.org/files/issues/2020-06-15/3059614-37.patch"
},
"drupal/field_states_ui": {
"https://www.drupal.org/node/3166929": "https://www.drupal.org/files/issues/2020-08-24/3166929-0.patch",
"https://www.drupal.org/node/3212229": "https://www.drupal.org/files/issues/2021-05-04/3212229-04.patch"
},
"drupal/layout_paragraphs": {
"https://www.drupal.org/node/3158244": "https://www.drupal.org/files/issues/2021-05-07/configurable_modal_width_3158244-7.patch",
"https://www.drupal.org/node/3199508": "https://www.drupal.org/files/issues/2021-03-11/3199508-2.patch"
},
"drupal/linkit": {
"https://www.drupal.org/node/2712951": "https://www.drupal.org/files/issues/2020-11-02/linkit-for-link-field-2712951-194.patch"
},
"drupal/media_video_micromodal": {
"https://www.drupal.org/project/media_video_micromodal/issues/3254845": "https://www.drupal.org/files/issues/2021-12-16/fid-matches-media-id-error-2.patch"
},
"drupal/migrate_plus": {
"https://www.drupal.org/project/migrate_plus/issues/2787157": "https://www.drupal.org/files/issues/2020-10-06/fix_xpath_error-2787157-17.patch"
},
"drupal/simple_gmap": {
"https://www.drupal.org/node/2863979": "https://www.drupal.org/files/issues/2018-11-21/simple_gmap-address-formatter-2863979-36.patch"
},
"drupal/stage_file_proxy": {
"https://www.drupal.org/node/2882986": "https://www.drupal.org/files/issues/stage_file_proxy-basic-auth-2882986-3-D8.patch"
},
"drupal/svg_image": {
"https://www.drupal.org/node/3023212": "https://www.drupal.org/files/issues/2018-12-31/missing_schema_field_formatter.patch"
},
"drupal/viewsreference": {
"https://www.drupal.org/node/3192468": "https://www.drupal.org/files/issues/2021-01-12/3192468-2.patch"
},
"drupal/viewsreference_filter": {
"https://www.drupal.org/node/3192458": "https://www.drupal.org/files/issues/2021-01-12/3192458-2.patch"
},
"drupal/views_selective_filters": {
"https://www.drupal.org/project/views_selective_filters/issues/3170132": "https://www.drupal.org/files/issues/2021-06-16/d9-compatibility-fixes-3170132-6.patch"
}
},
"patchLevel": {
"drupal/core": "-p2"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment