[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-cvs
Subject:    [PHP-CVS] [php-src] master: The ZipArchive::FL_RECOMPRESS constant is deprecated
From:       Remi Collet <noreply () php ! net>
Date:       2023-06-28 12:41:40
Message-ID: pMvC3Gkb1rpM12sMEENs6lamw0Op89qrtcoTnjsUw () main ! php ! net
[Download RAW message or body]

Author: Remi Collet (remicollet)
Date: 2023-06-28T14:28:09+02:00

Commit: https://github.com/php/php-src/commit/d8dd72fc31bf69c91fc778af77043ff5688e4e41
 Raw diff: https://github.com/php/php-src/commit/d8dd72fc31bf69c91fc778af77043ff5688e4e41.diff


The ZipArchive::FL_RECOMPRESS constant is deprecated

Changed paths:
  M  ext/zip/php_zip.stub.php
  M  ext/zip/php_zip_arginfo.h


Diff:

diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php
index 070dbceffdaf..1ea4945876da 100644
--- a/ext/zip/php_zip.stub.php
+++ b/ext/zip/php_zip.stub.php
@@ -114,11 +114,15 @@ class ZipArchive implements Countable
      * @cvalue ZIP_FL_UNCHANGED
      */
     public const FL_UNCHANGED = UNKNOWN;
+/* deprecated in libzip 1.10.0 */
+#ifdef ZIP_FL_RECOMPRESS
     /**
      * @var int
      * @cvalue ZIP_FL_RECOMPRESS
+     * @deprecated
      */
     public const FL_RECOMPRESS = UNKNOWN;
+#endif
     /**
      * @var int
      * @cvalue ZIP_FL_ENCRYPTED
diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h
index f9a904cdd89c..156bdaf2ac77 100644
--- a/ext/zip/php_zip_arginfo.h
+++ b/ext/zip/php_zip_arginfo.h
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 28437141f4e401f2a50984e6eb3b5ee33e91e605 */
+ * Stub hash: 65df723218ea5ca470163ebaf540ea5bde541824 */
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1)
 	ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -563,12 +563,14 @@ static zend_class_entry \
*register_class_ZipArchive(zend_class_entry *class_entry  zend_string \
*const_FL_UNCHANGED_name = zend_string_init_interned("FL_UNCHANGED", \
sizeof("FL_UNCHANGED") - 1, 1);  zend_declare_class_constant_ex(class_entry, \
const_FL_UNCHANGED_name, &const_FL_UNCHANGED_value, ZEND_ACC_PUBLIC, NULL);  \
zend_string_release(const_FL_UNCHANGED_name); +#if defined(ZIP_FL_RECOMPRESS)
 
 	zval const_FL_RECOMPRESS_value;
 	ZVAL_LONG(&const_FL_RECOMPRESS_value, ZIP_FL_RECOMPRESS);
 	zend_string *const_FL_RECOMPRESS_name = zend_string_init_interned("FL_RECOMPRESS", \
                sizeof("FL_RECOMPRESS") - 1, 1);
-	zend_declare_class_constant_ex(class_entry, const_FL_RECOMPRESS_name, \
&const_FL_RECOMPRESS_value, ZEND_ACC_PUBLIC, NULL); \
+	zend_declare_class_constant_ex(class_entry, const_FL_RECOMPRESS_name, \
&const_FL_RECOMPRESS_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL);  \
zend_string_release(const_FL_RECOMPRESS_name); +#endif
 
 	zval const_FL_ENCRYPTED_value;
 	ZVAL_LONG(&const_FL_ENCRYPTED_value, ZIP_FL_ENCRYPTED);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic