Commit e7f022b3fc6 for php.net

commit e7f022b3fc61021671be86ff3eaeb5807a7e0a7c
Author: Tim Starling <tstarling@wikimedia.org>
Date:   Mon Feb 16 09:10:00 2026 +1100

    Remove ifdef guards for ZIP_RDONLY (#21195)

    ZIP_RDONLY was introduced in libzip 1.0.0 which is required since
    a979e9f897a90a580e883b1f39ce5673686ffc67

diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 4ff362bab15..7198fe99d31 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -1463,11 +1463,7 @@ PHP_METHOD(ZipArchive, open)
 	}

 	/* open for write without option to empty the archive */
-#ifdef ZIP_RDONLY
 	if ((flags & (ZIP_TRUNCATE | ZIP_RDONLY)) == 0) {
-#else
-	if ((flags & ZIP_TRUNCATE) == 0) {
-#endif
 		zend_stat_t st = {0};

 		/* exists and is empty */
diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php
index 8a37b2508da..2f055e83d34 100644
--- a/ext/zip/php_zip.stub.php
+++ b/ext/zip/php_zip.stub.php
@@ -82,12 +82,10 @@ class ZipArchive implements Countable
      * @cvalue ZIP_OVERWRITE
      */
     public const int OVERWRITE = UNKNOWN;
-#ifdef ZIP_RDONLY
     /**
      * @cvalue ZIP_RDONLY
      */
     public const int RDONLY = UNKNOWN;
-#endif

     /**
      * @cvalue ZIP_FL_NOCASE
diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h
index 2c5191d6fbd..f3d081daf04 100644
Binary files a/ext/zip/php_zip_arginfo.h and b/ext/zip/php_zip_arginfo.h differ