From 6a636b49d340bf319d7d444d7098bdb6b001bb06 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 12 Feb 2020 17:14:17 -0800 Subject: [PATCH] Remove patch files that are now loaded from URL The `composer.json` was updated to get these patch files via URL instead of via local/relative path. Future maintainers who wish to revise these patches will need to post new revisions somewhere with a durable URL *before* they can update `civicrm-core`. Keeping the files in here wrongly implies that you can revise the files in-situ - their presence is misleading. --- ...rm-custom-patches-zetacompoents-mail.patch | 27 ---------- .../phpoffice-common-xml-entity-fix.patch | 16 ------ .../phpword-libxml-fix-global-handling.patch | 53 ------------------- 3 files changed, 96 deletions(-) delete mode 100644 tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch delete mode 100644 tools/scripts/composer/patches/phpoffice-common-xml-entity-fix.patch delete mode 100644 tools/scripts/composer/patches/phpword-libxml-fix-global-handling.patch diff --git a/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch b/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch deleted file mode 100644 index e55de1dc68..0000000000 --- a/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/tests/tutorial_examples.php b/tests/tutorial_examples.php -index 3acadc3..06f1e71 100644 ---- a/tests/tutorial_examples.php -+++ b/tests/tutorial_examples.php -@@ -1,5 +1,4 @@ - dom = new \DOMDocument(); - $this->dom->loadXML($content); -- -+ libxml_disable_entity_loader($originalLibXMLEntityValue); -+ - return $this->dom; - } - diff --git a/tools/scripts/composer/patches/phpword-libxml-fix-global-handling.patch b/tools/scripts/composer/patches/phpword-libxml-fix-global-handling.patch deleted file mode 100644 index cc3673fd0b..0000000000 --- a/tools/scripts/composer/patches/phpword-libxml-fix-global-handling.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 27ee4bef48def2e3b966b6d5ff8cc8c56b1fac2c Mon Sep 17 00:00:00 2001 -From: Seamus Lee -Date: Sun, 24 Feb 2019 09:06:51 +1100 -Subject: [PATCH] Ensure that entity_loader disable variable is re-set back to - the original setting - ---- - src/PhpWord/Shared/Html.php | 2 ++ - src/PhpWord/TemplateProcessor.php | 2 ++ - 3 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/PhpWord/Shared/Html.php b/src/PhpWord/Shared/Html.php -index 89881822ca..f2710ea168 100644 ---- a/src/PhpWord/Shared/Html.php -+++ b/src/PhpWord/Shared/Html.php -@@ -72,7 +72,7 @@ public static function addHtml($element, $html, $fullHTML = false, $preserveWhit - } - - // Load DOM -- libxml_disable_entity_loader(true); -+ $orignalLibEntityLoader = libxml_disable_entity_loader(true); - $dom = new \DOMDocument(); - $dom->preserveWhiteSpace = $preserveWhiteSpace; - $dom->loadXML($html); -@@ -80,6 +80,7 @@ public static function addHtml($element, $html, $fullHTML = false, $preserveWhit - $node = $dom->getElementsByTagName('body'); - - self::parseNode($node->item(0), $element); -+ libxml_disable_entity_loader($orignalLibEntityLoader); - } - - /** -diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php -index 0f685bc45b..7efc0f1ac8 100644 ---- a/src/PhpWord/TemplateProcessor.php -+++ b/src/PhpWord/TemplateProcessor.php -@@ -170,7 +170,7 @@ protected function readPartWithRels($fileName) - */ - protected function transformSingleXml($xml, $xsltProcessor) - { -- libxml_disable_entity_loader(true); -+ $orignalLibEntityLoader = libxml_disable_entity_loader(true); - $domDocument = new \DOMDocument(); - if (false === $domDocument->loadXML($xml)) { - throw new Exception('Could not load the given XML document.'); -@@ -180,6 +180,7 @@ protected function transformSingleXml($xml, $xsltProcessor) - if (false === $transformedXml) { - throw new Exception('Could not transform the given XML document.'); - } -+ libxml_disable_entity_loader($orignalLibEntityLoader); - - return $transformedXml; - } -- 2.25.1