PHP_CodeSniffer icon indicating copy to clipboard operation
PHP_CodeSniffer copied to clipboard

GH Actions: test against libxml 2.14

Open jrfnl opened this issue 9 months ago • 8 comments

Description

Libxml 2.14 has been released a few days ago. Considering the issues we've previously seen with different libxml versions, let's have at least one build which runs against libxml 2.14.

Ref: https://gitlab.gnome.org/GNOME/libxml2/-/blob/2.14/NEWS

Suggested changelog entry

N/A

Related issues/external references

Related to #849

jrfnl avatar Mar 30 '25 20:03 jrfnl

Hmm... looks like this isn't working as expected. In contrast to the builds with libxml 2.11 and 2.13, the libxml 2.14 library does not seem to get picked up automatically: image

Might need a more recent PHP version ? @asispts @remicollet Got any insights into why this isn't working ?

jrfnl avatar Mar 30 '25 20:03 jrfnl

Rebased without changes to trigger a new build as new PHP releases have come out which may incidentally (or intentionally) have fixed the problem with the PR. Let's see....

jrfnl avatar Apr 13 '25 02:04 jrfnl

Unfortunately, no such luck...

jrfnl avatar Apr 13 '25 02:04 jrfnl

Trying again... Rebased without changes to trigger a new build as new PHP releases have come out which may incidentally (or intentionally) have fixed the problem with the PR. Let's see....

jrfnl avatar May 18 '25 13:05 jrfnl

Unfortunately still not working: https://github.com/PHPCSStandards/PHP_CodeSniffer/actions/runs/15096666576/job/42432280555#step:13:9

jrfnl avatar May 18 '25 14:05 jrfnl

I've looked into this. I have found that since version 2.14.0, the library has changed the its soname. After learning this, I found it is listed in their NEWS file: https://gitlab.gnome.org/GNOME/libxml2/-/blob/v2.14.0/NEWS#L11-12 Because PHP is compiled with the old soname, it's not finding the new library that we're compiling here.

I think this means that PHP needs to be compiled to support the new soname / ABI for this library version. I don't love the idea of doing that within a pipeline here. Are there any other PHP images which already have libxml2 version 2.14.0 or later available?

fredden avatar May 23 '25 13:05 fredden

I've looked into this. I have found that since version 2.14.0, the library has changed the its soname. After learning this, I found it is listed in their NEWS file: https://gitlab.gnome.org/GNOME/libxml2/-/blob/v2.14.0/NEWS#L11-12 Because PHP is compiled with the old soname, it's not finding the new library that we're compiling here.

Thank you for looking into this @fredden ! Sounds like you've identified the cause why this build isn't working.

I think this means that PHP needs to be compiled to support the new soname / ABI for this library version. I don't love the idea of doing that within a pipeline here.

Nor me. It might be worth checking if this is already on the radar of the PHP project itself ? My knowledge of the way the compiling works is limited, but I wonder if there is something which can be updated in the PHP build pipeline and/or in how the external extension is recognized. I have no qualms about waiting with adding this to our pipeline until the PHP project itself officially supports libxml 2.14.

Are there any other PHP images which already have libxml2 version 2.14.0 or later available?

@remicollet I have a feeling you are better positioned to answer this ?

jrfnl avatar May 23 '25 13:05 jrfnl

Some very loosely related tickets I found about libxml 2.14 support in the PHP project:

  • https://github.com/php/php-src/issues/18009
  • https://github.com/php/php-src/issues/18486

jrfnl avatar May 23 '25 13:05 jrfnl