summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0001-support-8.2.patch120
-rw-r--r--PHPINFO4
-rw-r--r--REFLECTION4
-rw-r--r--php-pecl-zip.spec19
4 files changed, 13 insertions, 134 deletions
diff --git a/0001-support-8.2.patch b/0001-support-8.2.patch
deleted file mode 100644
index dd3f061..0000000
--- a/0001-support-8.2.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 7afdbe2fc07b0e862b6e79190f9ff7f1ff3f61f9 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Wed, 11 May 2022 14:02:38 +0200
-Subject: [PATCH] support 8.2
-
----
- config.m4 | 4 ++--
- config.w32 | 2 ++
- php81/php_zip.c | 4 ++++
- tests/bug53603.phpt | 1 +
- tests/bug53885_php8.phpt | 2 +-
- tests/bug70752.phpt | 2 +-
- tests/oo_getstatusstring.phpt | 4 ++--
- 7 files changed, 13 insertions(+), 6 deletions(-)
-
-diff --git a/config.m4 b/config.m4
-index 3737db2..390108b 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 80200; then
-- AC_MSG_RESULT(8.1)
-+ elif test $PHP_VERSION -lt 80300; then
-+ AC_MSG_RESULT(8.1/8.2)
- subdir=php81
- else
- AC_MSG_ERROR(PHP version $PHP_VERSION is not supported yet)
-diff --git a/config.w32 b/config.w32
-index 2d45fb6..1d1c3e0 100644
---- a/config.w32
-+++ b/config.w32
-@@ -30,6 +30,8 @@ if (PHP_ZIP != "no") {
- configure_module_dirname = configure_module_dirname + "\\php8";
- } else if (PHP_VERSION == 8 && PHP_MINOR_VERSION == 1) {
- configure_module_dirname = configure_module_dirname + "\\php81";
-+ } else if (PHP_VERSION == 8 && PHP_MINOR_VERSION == 2) {
-+ configure_module_dirname = configure_module_dirname + "\\php81";
- } else {
- ERROR("PHP " + PHP_VERSION + "." + PHP_MINOR_VERSION + " not supported");
- }
-diff --git a/php81/php_zip.c b/php81/php_zip.c
-index ca040b5..9be5a9b 100644
---- a/php81/php_zip.c
-+++ b/php81/php_zip.c
-@@ -993,7 +993,11 @@ static HashTable *php_zip_get_properties(zend_object *object)/* {{{ */
- return NULL;
- }
-
-+#if PHP_VERSION_ID < 80200
- ZEND_HASH_FOREACH_STR_KEY_PTR(obj->prop_handler, key, hnd) {
-+#else
-+ ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(obj->prop_handler, key, hnd) {
-+#endif
- zval *ret, val;
- ret = php_zip_property_reader(obj, hnd, &val);
- if (ret == NULL) {
-diff --git a/tests/bug53603.phpt b/tests/bug53603.phpt
-index b1058b0..76b8ad9 100644
---- a/tests/bug53603.phpt
-+++ b/tests/bug53603.phpt
-@@ -8,6 +8,7 @@ if(!extension_loaded('zip')) die('skip');
- <?php
-
- class TestStream {
-+ public $context;
- function url_stat($path, $flags) {
- if (!($flags & STREAM_URL_STAT_QUIET))
- trigger_error("not quiet");
-diff --git a/tests/bug53885_php8.phpt b/tests/bug53885_php8.phpt
-index 19fb350..f976d9a 100644
---- a/tests/bug53885_php8.phpt
-+++ b/tests/bug53885_php8.phpt
-@@ -19,7 +19,7 @@ $nx->statName("a",ZIPARCHIVE::FL_UNCHANGED);
- --CLEAN--
- <?php
- $fname = __DIR__."/test53885.zip";
--unlink($fname);
-+@unlink($fname);
- ?>
- --EXPECTF--
- Deprecated: ZipArchive::open(): Using empty file as ZipArchive is deprecated in %s
-diff --git a/tests/bug70752.phpt b/tests/bug70752.phpt
-index f006fbe..46546b5 100644
---- a/tests/bug70752.phpt
-+++ b/tests/bug70752.phpt
-@@ -27,5 +27,5 @@ bool(false)
- --CLEAN--
- <?php
- $filename = __DIR__ . DIRECTORY_SEPARATOR . 'bug70752.txt';
--unlink($filename);
-+@unlink($filename);
- ?>
-diff --git a/tests/oo_getstatusstring.phpt b/tests/oo_getstatusstring.phpt
-index efd19e3..5860b64 100644
---- a/tests/oo_getstatusstring.phpt
-+++ b/tests/oo_getstatusstring.phpt
-@@ -8,7 +8,7 @@ Ole-Petter Wikene <olepw@redpill-linpro.com>
- --FILE--
- <?php
-
--$dirname = dirname(__FILE__) . '/';
-+$dirname = __DIR__ . '/';
- $arch = new ZipArchive;
- $arch->open($dirname.'foo.zip',ZIPARCHIVE::CREATE);
- var_dump($arch->getStatusString());
-@@ -20,7 +20,7 @@ $arch->close();
- ?>
- --CLEAN--
- <?php
--unlink($dirname.'foo.zip');
-+@unlink(__DIR__ . '/foo.zip');
- ?>
- --EXPECT--
- string(8) "No error"
---
-2.35.3
-
diff --git a/PHPINFO b/PHPINFO
index c5c5166..a6b12b7 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,8 +2,8 @@
zip
Zip => enabled
-Zip version => 1.20.1
-Libzip version => 1.8.0
+Zip version => 1.21.0
+Libzip version => 1.9.1
BZIP2 compression => Yes
XZ compression => Yes
ZSTD compression => Yes
diff --git a/REFLECTION b/REFLECTION
index 44c3010..641d426 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #66 zip version 1.20.1 ] {
+Extension [ <persistent> extension #66 zip version 1.21.0 ] {
- Functions {
Function [ <internal, deprecated:zip> function zip_open ] {
@@ -177,7 +177,7 @@ Extension [ <persistent> extension #66 zip version 1.20.1 ] {
Constant [ public int EM_AES_192 ] { 258 }
Constant [ public int EM_AES_256 ] { 259 }
Constant [ public int EM_UNKNOWN ] { 65535 }
- Constant [ public string LIBZIP_VERSION ] { 1.8.0 }
+ Constant [ public string LIBZIP_VERSION ] { 1.9.1 }
}
- Static properties [0] {
diff --git a/php-pecl-zip.spec b/php-pecl-zip.spec
index 60ef394..fcaec5d 100644
--- a/php-pecl-zip.spec
+++ b/php-pecl-zip.spec
@@ -18,11 +18,11 @@
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name zip
-%global upstream_version 1.20.1
+%global upstream_version 1.21.0
#global upstream_prever dev
#global upstream_lower DEV
-%global libzip_version 1.8.0
+%global libzip_version 1.9.1
%if "%{php_version}" < "5.6"
%global ini_name %{pecl_name}.ini
@@ -34,15 +34,13 @@
Summary: A ZIP archive management extension
Name: %{?scl_prefix}php-pecl-zip
Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}}
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Languages
URL: https://pecl.php.net/package/zip
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
-Patch0: 0001-support-8.2.patch
-
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
@@ -146,8 +144,6 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
-%patch0 -p1
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_ZIP_VERSION/{s/.* "//;s/".*$//;p}' php7/php_zip.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}" -a "x${extver}" != "x%{upstream_version}-%{?upstream_prever}"; then
@@ -219,9 +215,6 @@ done
%check
OPT="-q --show-diff"
-%if "%{php_version}" > "8.0"
-OPT="$OPT %{?_smp_mflags}"
-%endif
cd NTS
: minimal load test of NTS extension
@@ -285,6 +278,12 @@ fi
%changelog
+* Tue Jun 28 2022 Remi Collet <remi@remirepo.net> - 1.21.0-1
+- update to 1.21.0
+
+* Mon Jun 13 2022 Remi Collet <remi@remirepo.net> - 1.20.1-3
+- more upstream patch for PHP 8.2
+
* Wed May 11 2022 Remi Collet <remi@remirepo.net> - 1.20.1-2
- add upstream patch for PHP 8.2