# Stricter requirements for libxml

- Thread: https://externals.io/message/123299
- Original archive: https://news-web.php.net/php.internals/123299
- Started by Niels Dossche on 2024-05-10T15:51:04+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #123299 — Niels Dossche — 2024-05-10T15:51:04+00:00

URL: https://externals.io/message/123299#123299

Hi internals

Libxml is used as the underlying library for many PHP extensions.
Interestingly, libxml can be built with supports for various features disabled.
E.g. you can build libxml without XPath, Schemas, HTML, ... support.
In that case, these features are unavailable in PHP. E.g. some classes may not be defined or functions may emit a warning instead of performing an action.

I'm thinking of proposing an RFC that puts stricter requirements on libxml at build time.
That would make such features a requirement during PHP's build process.
This will simplify maintenance and will also make sure that users can rely on these functionalities to always be available.

Please let me know what you think.

Kind regards
Niels

---

## #123300 — Sebastian Bergmann — 2024-05-10T15:52:46+00:00

URL: https://externals.io/message/123299#123300 · In reply to: #123299

Am 10.05.2024 um 17:51 schrieb Niels Dossche:
> Please let me know what you think.

+1

---

## #123317 — Derick Rethans — 2024-05-14T09:36:06+00:00

URL: https://externals.io/message/123299#123317 · In reply to: #123299

> Hi internals
> 
> Libxml is used as the underlying library for many PHP extensions.
> Interestingly, libxml can be built with supports for various features disabled.
> E.g. you can build libxml without XPath, Schemas, HTML, ... support.
> In that case, these features are unavailable in PHP. E.g. some classes may not be defined or functions may emit a warning instead of performing an action.
> 
> I'm thinking of proposing an RFC that puts stricter requirements on libxml at build time.
> That would make such features a requirement during PHP's build process.
> This will simplify maintenance and will also make sure that users can rely on these functionalities to always be available.
> 
> Please let me know what you think.

That seems sensible. Did you find any Linux distribution that actively 
disables these features, or is this a "just in case" kind of change?

cheers,
Derick

---

## #123319 — Niels Dossche — 2024-05-14T18:47:53+00:00

URL: https://externals.io/message/123299#123319 · In reply to: #123317

> 
> 
> > […]
> 
> That seems sensible. Did you find any Linux distribution that actively 
> disables these features, or is this a "just in case" kind of change?
> 
> cheers,
> Derick

I am not aware of a distro that disables these features. This is a "just in case" thing.
The fact that I didn't find one is also a motivation to make this change: why should we make the code more complicated to support a configuration that doesn't seem to be used? :)

Kind regards
Niels
