From f74f9b073afa636ca74879bbb43e44f8a7fa8730 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:35:34 +0200 Subject: [PATCH 1/2] Update libxml test for the directory field behaviour change See https://gitlab.gnome.org/GNOME/libxml2/-/issues/753. The base directory for the entity is no longer set, follow the upstream behaviour. --- .../tests/libxml_set_external_entity_loader_variation1.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/libxml/tests/libxml_set_external_entity_loader_variation1.phpt b/ext/libxml/tests/libxml_set_external_entity_loader_variation1.phpt index b480652209d..e56e59c3869 100644 --- a/ext/libxml/tests/libxml_set_external_entity_loader_variation1.phpt +++ b/ext/libxml/tests/libxml_set_external_entity_loader_variation1.phpt @@ -61,7 +61,7 @@ string(13) "-//FOO/ENTITY" string(32) "http://example.com/fooentity.ent" array(4) { ["directory"]=> - string(%d) "%s" + %r(NULL|string\(%d\) "%s")%r ["intSubName"]=> string(3) "foo" ["extSubURI"]=> From 3ec5919e14897b47e914efddd17f01750ba3ba86 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:37:21 +0200 Subject: [PATCH 2/2] Update error message for libxml 2.13 External entity loading got its error level decreased in upstream, which means they now map to E_NOTICE. Also the error message format has changed. --- ext/libxml/tests/bug61367-read_2.phpt | 2 +- ext/libxml/tests/libxml_disable_entity_loader_2.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/libxml/tests/bug61367-read_2.phpt b/ext/libxml/tests/bug61367-read_2.phpt index bbcf696773b..f4b0f300293 100644 --- a/ext/libxml/tests/bug61367-read_2.phpt +++ b/ext/libxml/tests/bug61367-read_2.phpt @@ -58,6 +58,6 @@ bool(true) int(4) bool(true) -Warning: DOMDocument::loadXML(): %Sfailed to load external entity "file:///%s/test_bug_61367-read/bad" in %s on line %d +%s: DOMDocument::loadXML(): %Sfailed to load %s Warning: Attempt to read property "nodeValue" on null in %s on line %d diff --git a/ext/libxml/tests/libxml_disable_entity_loader_2.phpt b/ext/libxml/tests/libxml_disable_entity_loader_2.phpt index 182fe13cfda..216792600bf 100644 --- a/ext/libxml/tests/libxml_disable_entity_loader_2.phpt +++ b/ext/libxml/tests/libxml_disable_entity_loader_2.phpt @@ -39,6 +39,6 @@ bool(true) Deprecated: Function libxml_disable_entity_loader() is deprecated in %s on line %d bool(false) -Warning: DOMDocument::loadXML(): %Sfailed to load external entity "%s" in %s on line %d +%s: DOMDocument::loadXML(): %Sfailed to load %s bool(true) Done