[php-src] PR #11162: Fix GH-11160: Few tests failed building with new libxml 2.11.0

From: Date: Sat, 29 Apr 2023 19:30:41 +0000
Subject: [php-src] PR #11162: Fix GH-11160: Few tests failed building with new libxml 2.11.0
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-22406@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/11162 Author: nielsdos 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

« previous php.git-pulls (#22406) next »