-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Multiple test failures when building with --with-expat #13517
Comments
Thanks for the report. The failures come from both the evolution of the expat library, and because some tests assume libxml2 behaviour with respect to error handling. There are small differences in how errors are handled and reported which cause visible differences in the tests. The differences are not bugs. The solution I went with was to split the tests.
Still works, just not tested on a regular basis.
The XML extension links against expat, but since you still have other XML extension enabled (e.g. the DOM extension), they link against libxml2. This has no negative impact.
I've made a PR to update the expat library URLs too: php/doc-base#117
Seems harmless, it's configuration related. |
The reflection failure is because the XML extension is used to check the module dependency information, but that extension can be configured to not depend on ext/libxml, resulting in a different output. The solution is to check another extension instead. The test failures in ext/xml/tests are because of different behaviour between libxml2 and Expat error handling. These are expected differences and the solution is to split the tests.
@nielsdos is there a chance that the CI could be made to also cover compilation and test execution with |
We could add it to the nightly workflow. |
@nielsdos That makes sense to me. |
* PHP-8.2: Fix GH-13517: Multiple test failures when building with --with-expat
* PHP-8.3: Fix GH-13517: Multiple test failures when building with --with-expat
Description
Compiling latest php with expat support (./configure --with-expat; make; make test) leads to multiple test failures in xml-related tests.
I'll attach the test output.
I'm unsure about the support status of expat in php. This doc https://www.php.net/manual/en/xml.requirements.php implies that with that option, it would use expat as its xml backend. But when building, it links against both libxml2 and expat, and I'm unsure what the implications are. Those docs also link to a very old expat webpage, and the notes about building expat are probably obsolete. I think it would be good to update and clarify those docs.
This is I believe the relevant part from the test log:
(The setlocale failures seem unrelated to expat/xml, they also appear when building with default options)
php_test_results_20240226_1616.txt
PHP Version
PHP 8.3.3
Operating System
No response
The text was updated successfully, but these errors were encountered: