From d8814bb56c836d0d76f8353ef82c16b2f80ff9ca Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 24 Apr 2024 15:19:39 +0200 Subject: [PATCH] compatibility with 8.4 --- config.m4 | 4 ++-- config.w32 | 2 ++ package.xml | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config.m4 b/config.m4 index 97f687a..e196729 100644 --- a/config.m4 +++ b/config.m4 @@ -27,8 +27,8 @@ if test "$PHP_ZIP" != "no"; then elif test $PHP_VERSION -lt 80100; then AC_MSG_RESULT(8.0) subdir=php8 - elif test $PHP_VERSION -lt 80400; then - AC_MSG_RESULT(8.1/8.2/8.3) + elif test $PHP_VERSION -lt 80500; then + AC_MSG_RESULT(8.1/8.2/8.3/8.4) subdir=php81 else AC_MSG_ERROR(PHP version $PHP_VERSION is not supported yet) From d66c502aa9bba9aed8b553098e80ff9902207927 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sat, 1 Jun 2024 14:07:06 +0200 Subject: [PATCH] Add missing pcre dependency definition to zip extension The zip extension also requires the pcre extension. --- config.m4 | 1 + config.w32 | 1 + php5/php_zip.c | 8 +++++++- php7/php_zip.c | 8 +++++++- php73/php_zip.c | 8 +++++++- php74/php_zip.c | 8 +++++++- php8/php_zip.c | 8 +++++++- php81/php_zip.c | 8 +++++++- 8 files changed, 44 insertions(+), 6 deletions(-) diff --git a/config.m4 b/config.m4 index e196729..0b4669b 100644 --- a/config.m4 +++ b/config.m4 @@ -142,6 +142,7 @@ if test "$PHP_ZIP" != "no"; then AC_DEFINE(HAVE_ZIP,1,[ ]) PHP_NEW_EXTENSION(zip, $PHP_ZIP_SOURCES, $ext_shared,, $LIBZIP_CFLAGS) + PHP_ADD_EXTENSION_DEP(zip, pcre) else AC_MSG_ERROR([libzip is no more bundled: install libzip version >= 0.11 (1.3.0 recommended for encryption and bzip2 support)]) fi diff --git a/php5/php_zip.c b/php5/php_zip.c index 0b61c0d..eccd1cc 100644 --- a/php5/php_zip.c +++ b/php5/php_zip.c @@ -1338,10 +1338,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip); static PHP_MINFO_FUNCTION(zip); /* }}} */ +static const zend_module_dep zip_deps[] = { + ZEND_MOD_REQUIRED("pcre") + ZEND_MOD_END +}; + /* {{{ zip_module_entry */ zend_module_entry zip_module_entry = { - STANDARD_MODULE_HEADER, + STANDARD_MODULE_HEADER_EX, NULL, + zip_deps, "zip", zip_functions, PHP_MINIT(zip), diff --git a/php7/php_zip.c b/php7/php_zip.c index 0470d52..aa8b71e 100644 --- a/php7/php_zip.c +++ b/php7/php_zip.c @@ -1226,10 +1226,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip); static PHP_MINFO_FUNCTION(zip); /* }}} */ +static const zend_module_dep zip_deps[] = { + ZEND_MOD_REQUIRED("pcre") + ZEND_MOD_END +}; + /* {{{ zip_module_entry */ zend_module_entry zip_module_entry = { - STANDARD_MODULE_HEADER, + STANDARD_MODULE_HEADER_EX, NULL, + zip_deps, "zip", zip_functions, PHP_MINIT(zip), diff --git a/php73/php_zip.c b/php73/php_zip.c index e56a94d..ee68b0f 100644 --- a/php73/php_zip.c +++ b/php73/php_zip.c @@ -1229,10 +1229,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip); static PHP_MINFO_FUNCTION(zip); /* }}} */ +static const zend_module_dep zip_deps[] = { + ZEND_MOD_REQUIRED("pcre") + ZEND_MOD_END +}; + /* {{{ zip_module_entry */ zend_module_entry zip_module_entry = { - STANDARD_MODULE_HEADER, + STANDARD_MODULE_HEADER_EX, NULL, + zip_deps, "zip", zip_functions, PHP_MINIT(zip), diff --git a/php74/php_zip.c b/php74/php_zip.c index 52ae83d..3c4c509 100644 --- a/php74/php_zip.c +++ b/php74/php_zip.c @@ -1241,10 +1241,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip); static PHP_MINFO_FUNCTION(zip); /* }}} */ +static const zend_module_dep zip_deps[] = { + ZEND_MOD_REQUIRED("pcre") + ZEND_MOD_END +}; + /* {{{ zip_module_entry */ zend_module_entry zip_module_entry = { - STANDARD_MODULE_HEADER, + STANDARD_MODULE_HEADER_EX, NULL, + zip_deps, "zip", zip_functions, PHP_MINIT(zip), diff --git a/php8/php_zip.c b/php8/php_zip.c index 34bddd1..93d633b 100644 --- a/php8/php_zip.c +++ b/php8/php_zip.c @@ -1141,10 +1141,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip); static PHP_MINFO_FUNCTION(zip); /* }}} */ +static const zend_module_dep zip_deps[] = { + ZEND_MOD_REQUIRED("pcre") + ZEND_MOD_END +}; + /* {{{ zip_module_entry */ zend_module_entry zip_module_entry = { - STANDARD_MODULE_HEADER, + STANDARD_MODULE_HEADER_EX, NULL, "zip", + zip_deps, ext_functions, PHP_MINIT(zip), PHP_MSHUTDOWN(zip), diff --git a/php81/php_zip.c b/php81/php_zip.c index 274ddf1..97194ba 100644 --- a/php81/php_zip.c +++ b/php81/php_zip.c @@ -1156,9 +1156,15 @@ static PHP_MSHUTDOWN_FUNCTION(zip); static PHP_MINFO_FUNCTION(zip); /* }}} */ +static const zend_module_dep zip_deps[] = { + ZEND_MOD_REQUIRED("pcre") + ZEND_MOD_END +}; + /* {{{ zip_module_entry */ zend_module_entry zip_module_entry = { - STANDARD_MODULE_HEADER, + STANDARD_MODULE_HEADER_EX, NULL, + zip_deps, "zip", ext_functions, PHP_MINIT(zip),