[php-src] PHP-8.4: ext/zip: Exclude broken libzip 1.12 (#24358)
| From: | Weilin Du via GitHub | Date: | Sun, 25 Oct 2026 13:54:02 +0000 |
| Subject: | [php-src] PHP-8.4: ext/zip: Exclude broken libzip 1.12 (#24358) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-142713@lists.php.net to get a copy of this message | ||
Author: Weilin Du (LamentXU123)
Committer: GitHub (web-flow)
Pusher: LamentXU123
Date: 2026-10-25T21:53:59+08:00
Commit: https://github.com/php/php-src/commit/2f6fd11671e1a34067d8d63ed30eb2cacf7b281d
Raw diff: https://github.com/php/php-src/commit/2f6fd11671e1a34067d8d63ed30eb2cacf7b281d.diff
ext/zip: Exclude broken libzip 1.12 (#24358)
libzip 1.12 introduced a regression that prevents adding or replacing files in TorrentZip archives,
causing oo_torrentzip.phpt to fail. This was fixed in libzip 1.12.1.
Exclude both 1.12 and 1.12.0 at configure time, as pkg-config treats them as distinct versions.
See https://github.com/nih-at/libzip/issues/617.
Changed paths:
M NEWS
M ext/zip/config.m4
Diff:
diff --git a/NEWS b/NEWS
index 6ddb492d18bc..5116cc1aa161 100644
--- a/NEWS
+++ b/NEWS
@@ -184,6 +184,8 @@ PHP NEWS
tidy::repairFile() rejecting null for $encoding. (lacatoire)
- Zip:
+ . Excluded libzip 1.12.0 due to a regression preventing additions and
+ replacements in torrentzip archives. (Weilin Du)
. Fixed use-after-free when re-entering ZipArchive during destruction or
a close warning, and rejected opening streams while closing. (jvoisin)
. Fixed a use-after-free when a ZipArchive method that modifies the archive
diff --git a/ext/zip/config.m4 b/ext/zip/config.m4
index 643397c19721..d0fbb4d856d8 100644
--- a/ext/zip/config.m4
+++ b/ext/zip/config.m4
@@ -4,7 +4,7 @@ PHP_ARG_WITH([zip],
[Include Zip read/write support])])
if test "$PHP_ZIP" != "no"; then
- PKG_CHECK_MODULES([LIBZIP], [libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0])
+ PKG_CHECK_MODULES([LIBZIP], [libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0 libzip != 1.12
libzip != 1.12.0])
PHP_EVAL_INCLINE([$LIBZIP_CFLAGS])
PHP_EVAL_LIBLINE([$LIBZIP_LIBS], [ZIP_SHARED_LIBADD])