Skip to content

Commit 59894c7

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: zip version bump to 1.21.1 remove LIBZIP_VERSION constant def from stub
2 parents 75409cd + ef4c20d commit 59894c7

File tree

4 files changed

+8
-21
lines changed

4 files changed

+8
-21
lines changed

ext/zip/php_zip.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3110,6 +3110,12 @@ static PHP_MINIT_FUNCTION(zip)
31103110
php_zip_register_prop_handler(&zip_prop_handlers, "filename", NULL, php_zipobj_get_filename, IS_STRING);
31113111
php_zip_register_prop_handler(&zip_prop_handlers, "comment", NULL, php_zipobj_get_zip_comment, IS_STRING);
31123112

3113+
#ifdef HAVE_LIBZIP_VERSION
3114+
zend_declare_class_constant_string(zip_class_entry, "LIBZIP_VERSION", sizeof("LIBZIP_VERSION")-1, zip_libzip_version());
3115+
#else
3116+
zend_declare_class_constant_string(zip_class_entry, "LIBZIP_VERSION", sizeof("LIBZIP_VERSION")-1, LIBZIP_VERSION);
3117+
#endif
3118+
31133119
php_register_url_stream_wrapper("zip", &php_stream_zip_wrapper);
31143120

31153121
le_zip_dir = zend_register_list_destructors_ex(php_zip_free_dir, NULL, le_zip_dir_name, module_number);

ext/zip/php_zip.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,7 @@ extern zend_module_entry zip_module_entry;
3131
#define ZIP_OVERWRITE ZIP_TRUNCATE
3232
#endif
3333

34-
#define PHP_ZIP_VERSION "1.21.0"
35-
36-
#ifdef HAVE_LIBZIP_VERSION
37-
#define LIBZIP_VERSION_STR zip_libzip_version()
38-
#else
39-
#define LIBZIP_VERSION_STR LIBZIP_VERSION
40-
#endif
34+
#define PHP_ZIP_VERSION "1.21.1"
4135

4236
#define ZIP_OPENBASEDIR_CHECKPATH(filename) php_check_open_basedir(filename)
4337

ext/zip/php_zip.stub.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -633,12 +633,6 @@ class ZipArchive implements Countable
633633
*/
634634
public const EM_UNKNOWN = UNKNOWN;
635635

636-
/**
637-
* @var string
638-
* @cvalue LIBZIP_VERSION_STR
639-
*/
640-
public const LIBZIP_VERSION = UNKNOWN;
641-
642636
/** @readonly */
643637
public int $lastId;
644638
/** @readonly */

ext/zip/php_zip_arginfo.h

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)