History log of /php-src/ext/dom/tests/DOMDocument_load_error2_gte2_11.phpt (Results 1 – 3 of 3)
Revision Date Author Comments
# ae83d6ab 29-Nov-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix issues related to libxml2 2.12.0 (#12802)

* Avoid passing NULL to xmlSwitchToEncoding

This otherwise switches to UTF-8 on libxml2 2.12.0

* Split tests for different err

Fix issues related to libxml2 2.12.0 (#12802)

* Avoid passing NULL to xmlSwitchToEncoding

This otherwise switches to UTF-8 on libxml2 2.12.0

* Split tests for different error reporting behaviour in libxml2 2.12.0

* Avoid deprecation warnings for libxml2 2.12.0

We can't fully get rid of the parser globals as there are still APIs
that implicitly use them.

* Temporarily disable part of test for libxml 2.12.0 regression

See https://gitlab.gnome.org/GNOME/libxml2/-/issues/634

* Review fixes

* [ci skip] Update test description

show more ...


# d510b5ae 11-Jul-2023 George Peter Banyard

Remove assert.bail INI setting usage in DOMDocument tests


# 7c0dfc5c 29-Apr-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-11160: Few tests failed building with new libxml 2.11.0

It's possible to categorise the failures into 2 categories:
- Changed error message. In this case we either duplicate the

Fix GH-11160: Few tests failed building with new libxml 2.11.0

It's possible to categorise the failures into 2 categories:
- Changed error message. In this case we either duplicate the test and
modify the error message. Or if the change in error message is
small, we use the EXPECTF matchers to make the test compatible with both
old and new versions of libxml2.
- Missing warnings. This is caused by a change in libxml2 where the
parser started using SAX APIs internally [1]. In this case the
error_type passed to php_libxml_internal_error_handler() changed from
PHP_LIBXML_ERROR to PHP_LIBXML_CTX_WARNING because it internally
started to use the SAX handlers instead of the generic handlers.
However, for the SAX handlers the current input stack is empty, so
nothing is actually printed. I fixed this by falling back to a
regular warning without a filename & line number reference, which
mimicks the old behaviour. Furthermore, this change now also shows
an additional warning in a test which was previously hidden.

[1] https://gitlab.gnome.org/GNOME/libxml2/-/commit/9a82b94a94bd310db426edd453b0f38c6c8f69f5

Closes GH-11162.

show more ...