[php-src] PHP-8.5: Fix GH-24006: Skip gh18431.phpt when libzip lacks progress callbacks (#24009)
| From: | Lazizbek Ergashev via Weilin Du | Date: | Wed, 30 Sep 2026 11:08:25 +0000 |
| Subject: | [php-src] PHP-8.5: Fix GH-24006: Skip gh18431.phpt when libzip lacks progress callbacks (#24009) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-141760@lists.php.net to get a copy of this message | ||
Author: Lazizbek Ergashev (lazerg)
Committer: Weilin Du (LamentXU123)
Date: 2026-09-30T19:03:19+08:00
Commit: https://github.com/php/php-src/commit/21160846c389a273da0a0703480f77d6d4dca7c8
Raw diff: https://github.com/php/php-src/commit/21160846c389a273da0a0703480f77d6d4dca7c8.diff
Fix GH-24006: Skip gh18431.phpt when libzip lacks progress callbacks (#24009)
ZipArchive::registerProgressCallback() is only available when PHP is built
against libzip 1.3.0 or newer. Skip gh18431.phpt when the method is absent
to avoid an undefined method error, as the other progress callback tests
already do.
Closes #24009
Changed paths:
M ext/zip/tests/gh18431.phpt
Diff:
diff --git a/ext/zip/tests/gh18431.phpt b/ext/zip/tests/gh18431.phpt
index d4eb89c36c6b..b4225238ac38 100644
--- a/ext/zip/tests/gh18431.phpt
+++ b/ext/zip/tests/gh18431.phpt
@@ -2,6 +2,12 @@
GH-18431 (Registering ZIP progress callback twice doesn't work)
--EXTENSIONS--
zip
+--SKIPIF--
+<?php
+if (!method_exists(ZipArchive::class, 'registerProgressCallback')) {
+ die('skip progress callbacks are not supported');
+}
+?>
--FILE--
<?php
$file = __DIR__ . '/gh18431.zip';