From 8aa0e57495890656e138c13fc343e5a7cd45e56d Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 10 Feb 2020 22:02:53 -0800 Subject: [PATCH] composer.json - Patch URLs should be more concrete, less symbolic The previous commit made used patch URLs in the format: `https://raw.githubusercontent.com/civicrm/civicrm-core/master/{FILEPATH}` This is symbolic in that the `master` does not refer to a specific piece of content; it refers subjectively to the current developmental code. This creates a few problems: * When `civicrm-core` is tagged or branched, the `composer.json` still points to `master`. * If you need to update the patch-file, you send in a PR with a different patch URL, right? But any builds based on this PR would still use the canonical `master` rather than the proposed revision. Resolution: Don't point to patch-files symbolicly. Instead, address them specifically. This revision uses past Github commits (because that's easy), but it doesn't have to be in Github per se. It should be somewhere that's reliable and unlikely to change (preferrably with addressing by content checksum). In the Drupal community, you see a lot of examples pointing to file-attachments in the issue-tracker. --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 13e0a451ba..595b58bf16 100644 --- a/composer.json +++ b/composer.json @@ -240,13 +240,13 @@ }, "patches": { "phpoffice/common": { - "Fix handling of libxml_disable_entity_loader": "https://raw.githubusercontent.com/civicrm/civicrm-core/master/tools/scripts/composer/patches/phpoffice-common-xml-entity-fix.patch" + "Fix handling of libxml_disable_entity_loader": "https://raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/phpoffice-common-xml-entity-fix.patch" }, "phpoffice/phpword": { - "Fix handling of libxml_disable_entity_loader": "https://raw.githubusercontent.com/civicrm/civicrm-core/master/tools/scripts/composer/patches/phpword-libxml-fix-global-handling.patch" + "Fix handling of libxml_disable_entity_loader": "https://raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/phpword-libxml-fix-global-handling.patch" }, "zetacomponents/mail": { - "CiviCRM Custom Patches for ZetaCompoents mail": "https://raw.githubusercontent.com/civicrm/civicrm-core/master/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch" + "CiviCRM Custom Patches for ZetaCompoents mail": "https://raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch" } } } -- 2.25.1