Skip to content

Remove custom UTF-8 check function from ext/libxml #18706

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

Closed
wants to merge 2 commits into from

Conversation

nielsdos
Copy link
Member

@nielsdos nielsdos commented May 29, 2025

This was originally introduced as a workaround for a libxml2 bug [1]. This bug has been fixed for more than a decade [2], and we can use the libxml2 API again.

A quick search reveals no public users of this API.

[1] 7e53511
[2] GNOME/libxml2@3ffe90e

This was originally introduced as a workaround for a libxml2 bug [1].
This bug has been fixed for more than a decade, and we can use the
libxml2 API again.

[1] 7e53511
@DanielEScherzer
Copy link
Member

This bug has been fixed for more than a decade

Since you are linking to the workaround, can you also link to the fix that makes this no longer needed?

@nielsdos
Copy link
Member Author

Since you are linking to the workaround, can you also link to the fix that makes this no longer needed?

Done: GNOME/libxml2@3ffe90e

Copy link
Member

@DanielEScherzer DanielEScherzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed version was released in GNOME/libxml2@d1de4a3 libxml2-2.6.13

I suggest also linking to 74235ca where PHP's requirement upgraded from 2.6.11+ to 2.7.6+, ensuring that a fixed version was used

@@ -62,6 +62,7 @@ PHP 8.5 INTERNALS UPGRADE NOTES

- ext/libxml
. The refcount APIs now return an `unsigned int` instead of an `int`.
. Removed php_libxml_xmlCheckUTF8(). Use xmlCheckUTF8() from libxml instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really not have an exported UTF-8 checking function ourselves?! I checked and couldn't find anything.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really not have an exported UTF-8 checking function ourselves?! I checked and couldn't find anything.

We have some mbstring APIs that AFAIK are exported, but then you need mbstring loaded..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we'll have some due to ext/lexbor in master

@nielsdos nielsdos closed this in 3cb7d1b May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants