# Anyone against requiring libxml2 2.6.x for PHP 5.1?

- Thread: https://externals.io/message/14889
- Original archive: https://news-web.php.net/php.internals/14889
- Started by Christian Stocker on 2005-02-13T04:05:58+00:00
- Messages: 9
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #14889 — Christian Stocker — 2005-02-13T04:05:58+00:00

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

Hi

Anyone against requiring libxml2 2.6.x for PHP 5.1?

There are new features in 5.1, which only run with 2.6 (the new error 
handling system, for example, or proper namespace support for SAX). 
Those are currently ifdef'd, but it definitively would make the life of 
the XML maintainers a lot easier, if we could just throw away all < 2.6 
code ;)

Furthermore, ext/soap already requires 2.6.3.

If noone disagrees, we'll bump up the version number in the configure 
check and discard support for 2.5.

chregu




-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  chregu@bitflux.ch  |  gnupg-keyid 0x5CE1DECB

---

## #14901 — Adam Maccabee Trachtenberg — 2005-02-13T17:19:18+00:00

URL: https://externals.io/message/14889#14901 · In reply to: #14889

> There are new features in 5.1, which only run with 2.6 (the new error
> handling system, for example, or proper namespace support for SAX).
> Those are currently ifdef'd, but it definitively would make the life of
> the XML maintainers a lot easier, if we could just throw away all < 2.6
> code ;)

I don't see anything wrong with this, as libxml 2.6.0 came out in
October 2003. Of course, Debian stable still bundles 2.4.19, which is
from March 2002.

-adam

-- 
adam@trachtenberg.com | http://www.trachtenberg.com
author of o'reilly's "upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!

---

## #14902 — Christian Stocker — 2005-02-13T17:23:43+00:00

URL: https://externals.io/message/14889#14902 · In reply to: #14901

> 
> 
> 
> > […]
> 
> 
> I don't see anything wrong with this, as libxml 2.6.0 came out in
> October 2003. Of course, Debian stable still bundles 2.4.19, which is
> from March 2002.

Which is still less than 2.5.11, which is required for 5.0. Therefore 
Debian Stable people had to face this problem already with 5.0 ;)

Debian Testing has 2.6.11 and as we all know, Testing becomes stable 
"really soon" ;)

chregu

> 
> -adam
> 

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  chregu@bitflux.ch  |  gnupg-keyid 0x5CE1DECB

---

## #14905 — Adam Maccabee Trachtenberg — 2005-02-13T17:34:54+00:00

URL: https://externals.io/message/14889#14905 · In reply to: #14902

> Which is still less than 2.5.11, which is required for 5.0. Therefore
> Debian Stable people had to face this problem already with 5.0 ;)

Fair enough. Asking people to upgrade to 2.6.x vs 2.5.11 is minor.

-adam

-- 
adam@trachtenberg.com | http://www.trachtenberg.com
author of o'reilly's "upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!

---

## #14948 — Wez Furlong — 2005-02-15T01:37:41+00:00

URL: https://externals.io/message/14889#14948

I was talking with George about this at lunch today.  If we really
really do require the new version, then we should add a configure
check to enforce it, otherwise we should use appropriate #ifdefs.

Why?

Everytime we go to upgrade PHP, we find that we need to upgrade
libxml2 as well.  While it's fine for PHP to use that, what about
other packages that also require libxml2?   The paranoid sysadmin
inside us feels reluctant/worried at that prospect.

We (PHP) have had a similar issue with libcurl requirements in the
past too, to the point where I just stopped enabling it (things were
worse there though, as the download from sf.net was really
unpredictable and made it very difficult to get hold of the latest and
greatest).

So, my 2 cents are: if it's too much trouble to maintain those ifdefs,
bump the minimum requirements, otherwise, let's try to keep it
flexible.

--Wez.

On Tue, 15 Feb 2005 02:01:13 +0100, Christian Schneider
<cschneid@cschneid.com> wrote:
> Andi Gutmans wrote:
> > […]
> 
> SuSE 8.1: libxml2-2.4.23
> SuSE 8.2: libxml2-2.5.3
> SuSE 9.0: libxml2-2.5.10
> SuSE 9.1: libxml2-2.6.7
> SuSE 9.2: libxml2-2.6.12
> 
> I'd say that at least SuSE 8.2 and 9.0 are still quite common though.
> 
> - Chris

---

## #14955 — Adam Maccabee Trachtenberg — 2005-02-15T04:56:53+00:00

URL: https://externals.io/message/14889#14955 · In reply to: #14948

> I was talking with George about this at lunch today.  If we really
> really do require the new version, then we should add a configure
> check to enforce it, otherwise we should use appropriate #ifdefs.

Agreed. If we're requiring it, we need to modify the configure check.

> So, my 2 cents are: if it's too much trouble to maintain those ifdefs,
> bump the minimum requirements, otherwise, let's try to keep it
> flexible.

libxml2 is on a release monthly schedule. There are always new
versions coming out. This is how they deal with fixes and patches.

Part of the reason (I believe) Christian wants 2.6.x is to deal with
certain features that aren't in the 2.5.x feature set, and that's
probably also why ext/soap needs 2.6.3.

-adam

-- 
adam@trachtenberg.com | http://www.trachtenberg.com
author of o'reilly's "upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!

---

## #14962 — Christian Stocker — 2005-02-15T07:59:24+00:00

URL: https://externals.io/message/14889#14962 · In reply to: #14948

> I was talking with George about this at lunch today.  If we really
> really do require the new version, then we should add a configure
> check to enforce it, otherwise we should use appropriate #ifdefs.

The configure check was always in place (even during php 4 times). It's 
just currently wrong in HEAD, as it's not decided, which version we 
support ;) (and ext/soap is another chapter)

We can of course ifdef it out, but there are in my opinion different 
reasons for not going further that road.

* No current known distro supports 2.5.11, they are either below that or 
already at 2.6

* It's not only the ifdef'ing, but also the testing, which is a pain. We 
have to compile and link all the time against 2.5 and 2.6 if we want to 
support both. Given our limited resources, stuff like the current 
it-s-not-compiling-on-2.5, will always happen. The latest patches are 
ifdef'ed, but obviously not everywhere.

* Support and Documentation. If some DOM or XML features in PHP are only 
available, if you have libxml 2.6, that does make documentation more 
complicated and confuse people. And some things still do not work 
properly in 2.5, like namespaces in SAX.

* New features, easier programming, improved (but BC) API.

chregu

> 
> Why?
> 
> Everytime we go to upgrade PHP, we find that we need to upgrade
> libxml2 as well.  While it's fine for PHP to use that, what about
> other packages that also require libxml2?   The paranoid sysadmin
> inside us feels reluctant/worried at that prospect.
> 
> We (PHP) have had a similar issue with libcurl requirements in the
> past too, to the point where I just stopped enabling it (things were
> worse there though, as the download from sf.net was really
> unpredictable and made it very difficult to get hold of the latest and
> greatest).
> 
> So, my 2 cents are: if it's too much trouble to maintain those ifdefs,
> bump the minimum requirements, otherwise, let's try to keep it
> flexible.
> 
> --Wez.
> 
> On Tue, 15 Feb 2005 02:01:13 +0100, Christian Schneider
> <cschneid@cschneid.com> wrote:
> 
> > […]
> 
> 

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  chregu@bitflux.ch  |  gnupg-keyid 0x5CE1DECB

---

## #14969 — Rob Richards — 2005-02-15T14:00:24+00:00

URL: https://externals.io/message/14889#14969 · In reply to: #14962

Just to clarify soap. Soap will work under 2.6.0. I still have 2.6.3 
stuck in my head, but it may just be due to the fact that the windows 
build system is messed up for the early versions (can't really remember 
why I think 2.6.3 as a minimum version though).

I don't mind the ifdef'ing as much as the other issues that exist:

- soap requiring 2.6.x. If its part of the core, it should only require 
the libxml version defined for the libxml config.

- There are some differences between 2.5 and 2.6. Under PHP 5 we were 
able to work around some of these by adding functionality. It's more 
noticeable under PHP 4 where the behavior has changed and without 
altering the API of domxml, certain things just wont work.

- Testing and tracking down bugs is a big PITA due to the differences 
between 2.5 and 2.6

To touch on Wez's comment about always requiring new versions. Prior to 
the 5.0 release a few people wanted to require 2.6 as the base version. 
I was dead against this due to 2.6 being quite new. At that point I 
opted for stability as 2.5.10 was very stable and carried by a lot of 
the distros. It's not that every new PHP version will be requiring a 
newer libxml, its just that differences betwwen 2.5 and 2.6 are very 
substantial (not to mention the new functionality that has been added). 
I think the xml developers can deal with 2.6.x as a base version without 
having to require further version upgrades. Yes, there may be recommened 
minimum versions for whatever reason (security, stability, etc..), but 
at least for the xml extensions in core, 2.6 offers everything needed to 
allow for rich xml technologies. Anything requiring newer versions can 
easily live in PECL and require whatever version they like. As time goes 
on and 2.6.x becomes outdated and the distros arent even bothing with 
that version anymore then it may possibly make sense to upgrade the 
minimum version, but I dont see anything in the immediate future that is 
going to require further version upgrades.

And for RHEL customers. They can always grab the rpms from xmlsoft. I 
would assume - but not guarantee :) - the rpms are built against that 
since Daniel is an employee of RedHat.

Rob

Christian Stocker wrote:

>
> The configure check was always in place (even during php 4 times). 
> It's just currently wrong in HEAD, as it's not decided, which version 
> we support ;) (and ext/soap is another chapter)
>
> We can of course ifdef it out, but there are in my opinion different 
> reasons for not going further that road.
>
> * No current known distro supports 2.5.11, they are either below that 
> or already at 2.6
>
> * It's not only the ifdef'ing, but also the testing, which is a pain. 
> We have to compile and link all the time against 2.5 and 2.6 if we 
> want to support both. Given our limited resources, stuff like the 
> current it-s-not-compiling-on-2.5, will always happen. The latest 
> patches are ifdef'ed, but obviously not everywhere.
>
> * Support and Documentation. If some DOM or XML features in PHP are 
> only available, if you have libxml 2.6, that does make documentation 
> more complicated and confuse people. And some things still do not work 
> properly in 2.5, like namespaces in SAX.
>
> * New features, easier programming, improved (but BC) API.

---

## #14979 — Dan Scott — 2005-02-15T18:22:19+00:00

URL: https://externals.io/message/14889#14979 · In reply to: #14969

On Tue, 15 Feb 2005 09:00:24 -0500, Rob Richards
<rrichards@ctindustries.net> wrote:
<snip>
> And for RHEL customers. They can always grab the rpms from xmlsoft. I
> would assume - but not guarantee :) - the rpms are built against that
> since Daniel is an employee of RedHat.

RHEL 4 (released today) ships libxml2 2.6.16, so not all RHEL
customers would need the xmlsoft RPMs :)

Dan
