-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Few tests failed building with new libxml 2.11.0 #11160
Comments
Diff is
|
The tests whose message differs can be fixed by duplicating the test: have a version for <2.11 and a version for >=2.11 EDIT: it seems that the actual problem is the error_type being 2 instead of 0 ? |
Thank you! meantime this tests are excluded and the rest going good alpinelinux/aports@2b8cddf and alpinelinux/aports@482b784 |
I just performed a bisect on libxml2 and found this commit: https://gitlab.gnome.org/GNOME/libxml2/-/commit/9a82b94a94bd310db426edd453b0f38c6c8f69f5 is the first commit that breaks the PHP behaviour wrt the parser->input state. |
As I got lots of old parser-related APIs are deprecated, that's why mentioned in description |
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
* PHP-8.1: Fix GH-11160: Few tests failed building with new libxml 2.11.0
* PHP-8.2: Fix GH-11160: Few tests failed building with new libxml 2.11.0
Description
The following tests fail:with https://gitlab.gnome.org/GNOME/libxml2/-/tags/v2.11.0#deprecations
Diffs in first comment
PHP Version
PHP 8.1.18
Operating System
Alpinelinux
The text was updated successfully, but these errors were encountered: