summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO4
-rw-r--r--REFLECTION369
-rw-r--r--php-pecl-zip.spec167
3 files changed, 344 insertions, 196 deletions
diff --git a/PHPINFO b/PHPINFO
index 6edfa1d..9daeaee 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,8 +2,8 @@
zip
Zip => enabled
-Zip version => 1.20.0-dev
-Libzip version => 1.8.0
+Zip version => 1.22.3
+Libzip version => 1.10.1
BZIP2 compression => Yes
XZ compression => Yes
ZSTD compression => Yes
diff --git a/REFLECTION b/REFLECTION
index 7edd9f6..4f6df87 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,75 +1,83 @@
-Extension [ <persistent> extension #66 zip version 1.20.0-dev ] {
+Extension [ <persistent> extension #66 zip version 1.22.3 ] {
- Functions {
- Function [ <internal:zip> function zip_open ] {
+ Function [ <internal, deprecated:zip> function zip_open ] {
- Parameters [1] {
- Parameter #0 [ <required> $filename ]
+ Parameter #0 [ <required> string $filename ]
}
}
- Function [ <internal:zip> function zip_close ] {
+ Function [ <internal, deprecated:zip> function zip_close ] {
- Parameters [1] {
Parameter #0 [ <required> $zip ]
}
+ - Return [ void ]
}
- Function [ <internal:zip> function zip_read ] {
+ Function [ <internal, deprecated:zip> function zip_read ] {
- Parameters [1] {
Parameter #0 [ <required> $zip ]
}
}
- Function [ <internal:zip> function zip_entry_open ] {
+ Function [ <internal, deprecated:zip> function zip_entry_open ] {
- Parameters [3] {
Parameter #0 [ <required> $zip_dp ]
Parameter #1 [ <required> $zip_entry ]
- Parameter #2 [ <optional> $mode ]
+ Parameter #2 [ <optional> string $mode = "rb" ]
}
+ - Return [ bool ]
}
- Function [ <internal:zip> function zip_entry_close ] {
+ Function [ <internal, deprecated:zip> function zip_entry_close ] {
- Parameters [1] {
- Parameter #0 [ <required> $zip_ent ]
+ Parameter #0 [ <required> $zip_entry ]
}
+ - Return [ bool ]
}
- Function [ <internal:zip> function zip_entry_read ] {
+ Function [ <internal, deprecated:zip> function zip_entry_read ] {
- Parameters [2] {
Parameter #0 [ <required> $zip_entry ]
- Parameter #1 [ <optional> $len ]
+ Parameter #1 [ <optional> int $len = 1024 ]
}
+ - Return [ string|false ]
}
- Function [ <internal:zip> function zip_entry_filesize ] {
+ Function [ <internal, deprecated:zip> function zip_entry_name ] {
- Parameters [1] {
Parameter #0 [ <required> $zip_entry ]
}
+ - Return [ string|false ]
}
- Function [ <internal:zip> function zip_entry_name ] {
+ Function [ <internal, deprecated:zip> function zip_entry_compressedsize ] {
- Parameters [1] {
Parameter #0 [ <required> $zip_entry ]
}
+ - Return [ int|false ]
}
- Function [ <internal:zip> function zip_entry_compressedsize ] {
+ Function [ <internal, deprecated:zip> function zip_entry_filesize ] {
- Parameters [1] {
Parameter #0 [ <required> $zip_entry ]
}
+ - Return [ int|false ]
}
- Function [ <internal:zip> function zip_entry_compressionmethod ] {
+ Function [ <internal, deprecated:zip> function zip_entry_compressionmethod ] {
- Parameters [1] {
Parameter #0 [ <required> $zip_entry ]
}
+ - Return [ string|false ]
}
}
- Classes [1] {
Class [ <internal:zip> class ZipArchive implements Countable ] {
- - Constants [101] {
+ - Constants [109] {
Constant [ public int CREATE ] { 1 }
Constant [ public int EXCL ] { 2 }
Constant [ public int CHECKCONS ] { 4 }
@@ -89,6 +97,7 @@ Extension [ <persistent> extension #66 zip version 1.20.0-dev ] {
Constant [ public int FL_ENC_STRICT ] { 128 }
Constant [ public int FL_ENC_UTF_8 ] { 2048 }
Constant [ public int FL_ENC_CP437 ] { 4096 }
+ Constant [ public int FL_OPEN_FILE_NOW ] { 1073741824 }
Constant [ public int CM_DEFAULT ] { -1 }
Constant [ public int CM_STORE ] { 0 }
Constant [ public int CM_SHRINK ] { 1 }
@@ -142,6 +151,12 @@ Extension [ <persistent> extension #66 zip version 1.20.0-dev ] {
Constant [ public int ER_TELL ] { 30 }
Constant [ public int ER_COMPRESSED_DATA ] { 31 }
Constant [ public int ER_CANCELLED ] { 32 }
+ Constant [ public int ER_DATA_LENGTH ] { 33 }
+ Constant [ public int ER_NOT_ALLOWED ] { 34 }
+ Constant [ public int AFL_RDONLY ] { 2 }
+ Constant [ public int AFL_IS_TORRENTZIP ] { 4 }
+ Constant [ public int AFL_WANT_TORRENTZIP ] { 8 }
+ Constant [ public int AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE ] { 16 }
Constant [ public int OPSYS_DOS ] { 0 }
Constant [ public int OPSYS_AMIGA ] { 1 }
Constant [ public int OPSYS_OPENVMS ] { 2 }
@@ -151,7 +166,6 @@ Extension [ <persistent> extension #66 zip version 1.20.0-dev ] {
Constant [ public int OPSYS_OS_2 ] { 6 }
Constant [ public int OPSYS_MACINTOSH ] { 7 }
Constant [ public int OPSYS_Z_SYSTEM ] { 8 }
- Constant [ public int OPSYS_Z_CPM ] { 9 }
Constant [ public int OPSYS_CPM ] { 9 }
Constant [ public int OPSYS_WINDOWS_NTFS ] { 10 }
Constant [ public int OPSYS_MVS ] { 11 }
@@ -170,7 +184,9 @@ Extension [ <persistent> extension #66 zip version 1.20.0-dev ] {
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.10.1 }
+ Constant [ public int LENGTH_TO_END ] { 0 }
+ Constant [ public int LENGTH_UNCHECKED ] { -2 }
}
- Static properties [0] {
@@ -180,416 +196,481 @@ Extension [ <persistent> extension #66 zip version 1.20.0-dev ] {
Method [ <internal:zip> static public method isCompressionMethodSupported ] {
- Parameters [2] {
- Parameter #0 [ <required> $method ]
- Parameter #1 [ <optional> $encode ]
+ Parameter #0 [ <required> int $method ]
+ Parameter #1 [ <optional> bool $enc = true ]
}
+ - Return [ bool ]
}
Method [ <internal:zip> static public method isEncryptionMethodSupported ] {
- Parameters [2] {
- Parameter #0 [ <required> $method ]
- Parameter #1 [ <optional> $encode ]
+ Parameter #0 [ <required> int $method ]
+ Parameter #1 [ <optional> bool $enc = true ]
}
+ - Return [ bool ]
}
}
- Properties [6] {
- Property [ <default> public $lastId ]
- Property [ <default> public $status ]
- Property [ <default> public $statusSys ]
- Property [ <default> public $numFiles ]
- Property [ <default> public $filename ]
- Property [ <default> public $comment ]
+ Property [ public int $lastId ]
+ Property [ public int $status ]
+ Property [ public int $statusSys ]
+ Property [ public int $numFiles ]
+ Property [ public string $filename ]
+ Property [ public string $comment ]
}
- - Methods [48] {
+ - Methods [50] {
Method [ <internal:zip> public method open ] {
- Parameters [2] {
- Parameter #0 [ <required> $filename ]
- Parameter #1 [ <optional> $flags ]
+ Parameter #0 [ <required> string $filename ]
+ Parameter #1 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ int|bool ]
}
Method [ <internal:zip> public method setPassword ] {
- Parameters [1] {
- Parameter #0 [ <required> $password ]
+ Parameter #0 [ <required> string $password ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method close ] {
- Parameters [0] {
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip, prototype Countable> public method count ] {
- Parameters [0] {
}
+ - Tentative return [ int ]
}
Method [ <internal:zip> public method getStatusString ] {
- Parameters [0] {
}
+ - Tentative return [ string ]
}
Method [ <internal:zip> public method clearError ] {
- Parameters [0] {
}
+ - Return [ void ]
}
Method [ <internal:zip> public method addEmptyDir ] {
- Parameters [2] {
- Parameter #0 [ <required> $dirname ]
- Parameter #1 [ <optional> $flags ]
+ Parameter #0 [ <required> string $dirname ]
+ Parameter #1 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method addFromString ] {
- Parameters [3] {
- Parameter #0 [ <required> $name ]
- Parameter #1 [ <required> $content ]
- Parameter #2 [ <optional> $flags ]
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <required> string $content ]
+ Parameter #2 [ <optional> int $flags = ZipArchive::FL_OVERWRITE ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method addFile ] {
- Parameters [5] {
- Parameter #0 [ <required> $filepath ]
- Parameter #1 [ <optional> $entryname ]
- Parameter #2 [ <optional> $start ]
- Parameter #3 [ <optional> $length ]
- Parameter #4 [ <optional> $flags ]
+ Parameter #0 [ <required> string $filepath ]
+ Parameter #1 [ <optional> string $entryname = "" ]
+ Parameter #2 [ <optional> int $start = 0 ]
+ Parameter #3 [ <optional> int $length = ZipArchive::LENGTH_TO_END ]
+ Parameter #4 [ <optional> int $flags = ZipArchive::FL_OVERWRITE ]
+ }
+ - Tentative return [ bool ]
+ }
+
+ Method [ <internal:zip> public method replaceFile ] {
+
+ - Parameters [5] {
+ Parameter #0 [ <required> string $filepath ]
+ Parameter #1 [ <required> int $index ]
+ Parameter #2 [ <optional> int $start = 0 ]
+ Parameter #3 [ <optional> int $length = ZipArchive::LENGTH_TO_END ]
+ Parameter #4 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method addGlob ] {
- Parameters [3] {
- Parameter #0 [ <required> $pattern ]
- Parameter #1 [ <optional> $flags ]
- Parameter #2 [ <optional> $options ]
+ Parameter #0 [ <required> string $pattern ]
+ Parameter #1 [ <optional> int $flags = 0 ]
+ Parameter #2 [ <optional> array $options = [] ]
}
+ - Tentative return [ array|false ]
}
Method [ <internal:zip> public method addPattern ] {
- Parameters [3] {
- Parameter #0 [ <required> $pattern ]
- Parameter #1 [ <optional> $path ]
- Parameter #2 [ <optional> $options ]
+ Parameter #0 [ <required> string $pattern ]
+ Parameter #1 [ <optional> string $path = "." ]
+ Parameter #2 [ <optional> array $options = [] ]
}
+ - Tentative return [ array|false ]
}
Method [ <internal:zip> public method renameIndex ] {
- Parameters [2] {
- Parameter #0 [ <required> $index ]
- Parameter #1 [ <required> $new_name ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <required> string $new_name ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method renameName ] {
- Parameters [2] {
- Parameter #0 [ <required> $name ]
- Parameter #1 [ <required> $new_name ]
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <required> string $new_name ]
}
+ - Tentative return [ bool ]
}
- Method [ <internal:zip> public method replaceFile ] {
+ Method [ <internal:zip> public method setArchiveComment ] {
- - Parameters [5] {
- Parameter #0 [ <required> $filepath ]
- Parameter #1 [ <required> $index ]
- Parameter #2 [ <optional> $start ]
- Parameter #3 [ <optional> $length ]
- Parameter #4 [ <optional> $flags ]
+ - Parameters [1] {
+ Parameter #0 [ <required> string $comment ]
}
+ - Tentative return [ bool ]
}
- Method [ <internal:zip> public method setArchiveComment ] {
+ Method [ <internal:zip> public method getArchiveComment ] {
- Parameters [1] {
- Parameter #0 [ <required> $comment ]
+ Parameter #0 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ string|false ]
}
- Method [ <internal:zip> public method getArchiveComment ] {
+ Method [ <internal:zip> public method setArchiveFlag ] {
- - Parameters [1] {
- Parameter #0 [ <optional> $flags ]
+ - Parameters [2] {
+ Parameter #0 [ <required> int $flag ]
+ Parameter #1 [ <required> int $value ]
+ }
+ - Return [ bool ]
+ }
+
+ Method [ <internal:zip> public method getArchiveFlag ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <required> int $flag ]
+ Parameter #1 [ <optional> int $flags = 0 ]
}
+ - Return [ int ]
}
Method [ <internal:zip> public method setCommentIndex ] {
- Parameters [2] {
- Parameter #0 [ <required> $index ]
- Parameter #1 [ <required> $comment ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <required> string $comment ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method setCommentName ] {
- Parameters [2] {
- Parameter #0 [ <required> $name ]
- Parameter #1 [ <required> $comment ]
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <required> string $comment ]
}
+ - Tentative return [ bool ]
+ }
+
+ Method [ <internal:zip> public method setMtimeIndex ] {
+
+ - Parameters [3] {
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <required> int $timestamp ]
+ Parameter #2 [ <optional> int $flags = 0 ]
+ }
+ - Tentative return [ bool ]
+ }
+
+ Method [ <internal:zip> public method setMtimeName ] {
+
+ - Parameters [3] {
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <required> int $timestamp ]
+ Parameter #2 [ <optional> int $flags = 0 ]
+ }
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method getCommentIndex ] {
- Parameters [2] {
- Parameter #0 [ <required> $index ]
- Parameter #1 [ <optional> $flags ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ string|false ]
}
Method [ <internal:zip> public method getCommentName ] {
- Parameters [2] {
- Parameter #0 [ <required> $name ]
- Parameter #1 [ <optional> $flags ]
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ string|false ]
}
Method [ <internal:zip> public method deleteIndex ] {
- Parameters [1] {
- Parameter #0 [ <required> $index ]
+ Parameter #0 [ <required> int $index ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method deleteName ] {
- Parameters [1] {
- Parameter #0 [ <required> $name ]
+ Parameter #0 [ <required> string $name ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method statName ] {
- Parameters [2] {
- Parameter #0 [ <required> $filename ]
- Parameter #1 [ <optional> $flags ]
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ array|false ]
}
Method [ <internal:zip> public method statIndex ] {
- Parameters [2] {
- Parameter #0 [ <required> $index ]
- Parameter #1 [ <optional> $flags ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ array|false ]
}
Method [ <internal:zip> public method locateName ] {
- Parameters [2] {
- Parameter #0 [ <required> $filename ]
- Parameter #1 [ <optional> $flags ]
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ int|false ]
}
Method [ <internal:zip> public method getNameIndex ] {
- Parameters [2] {
- Parameter #0 [ <required> $index ]
- Parameter #1 [ <optional> $flags ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ string|false ]
}
Method [ <internal:zip> public method unchangeArchive ] {
- Parameters [0] {
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method unchangeAll ] {
- Parameters [0] {
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method unchangeIndex ] {
- Parameters [1] {
- Parameter #0 [ <required> $index ]
+ Parameter #0 [ <required> int $index ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method unchangeName ] {
- Parameters [1] {
- Parameter #0 [ <required> $name ]
+ Parameter #0 [ <required> string $name ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method extractTo ] {
- Parameters [2] {
- Parameter #0 [ <required> $pathto ]
- Parameter #1 [ <optional> $files ]
+ Parameter #0 [ <required> string $pathto ]
+ Parameter #1 [ <optional> array|string|null $files = null ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method getFromName ] {
- Parameters [3] {
- Parameter #0 [ <required> $entryname ]
- Parameter #1 [ <optional> $len ]
- Parameter #2 [ <optional> $flags ]
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <optional> int $len = 0 ]
+ Parameter #2 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ string|false ]
}
Method [ <internal:zip> public method getFromIndex ] {
- Parameters [3] {
- Parameter #0 [ <required> $index ]
- Parameter #1 [ <optional> $len ]
- Parameter #2 [ <optional> $flags ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <optional> int $len = 0 ]
+ Parameter #2 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ string|false ]
}
- Method [ <internal:zip> public method getStreamName ] {
+ Method [ <internal:zip> public method getStreamIndex ] {
- Parameters [2] {
- Parameter #0 [ <required> $entryname ]
- Parameter #1 [ <optional> $flags ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <optional> int $flags = 0 ]
}
}
- Method [ <internal:zip> public method getStreamIndex ] {
+ Method [ <internal:zip> public method getStreamName ] {
- Parameters [2] {
- Parameter #0 [ <required> $index ]
- Parameter #1 [ <optional> $flags ]
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <optional> int $flags = 0 ]
}
}
Method [ <internal:zip> public method getStream ] {
- Parameters [1] {
- Parameter #0 [ <required> $entryname ]
+ Parameter #0 [ <required> string $name ]
}
}
Method [ <internal:zip> public method setExternalAttributesName ] {
- Parameters [4] {
- Parameter #0 [ <required> $name ]
- Parameter #1 [ <required> $opsys ]
- Parameter #2 [ <required> $attr ]
- Parameter #3 [ <optional> $flags ]
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <required> int $opsys ]
+ Parameter #2 [ <required> int $attr ]
+ Parameter #3 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method setExternalAttributesIndex ] {
- Parameters [4] {
- Parameter #0 [ <required> $index ]
- Parameter #1 [ <required> $opsys ]
- Parameter #2 [ <required> $attr ]
- Parameter #3 [ <optional> $flags ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <required> int $opsys ]
+ Parameter #2 [ <required> int $attr ]
+ Parameter #3 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method getExternalAttributesName ] {
- Parameters [4] {
- Parameter #0 [ <required> $name ]
+ Parameter #0 [ <required> string $name ]
Parameter #1 [ <required> &$opsys ]
Parameter #2 [ <required> &$attr ]
- Parameter #3 [ <optional> $flags ]
+ Parameter #3 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method getExternalAttributesIndex ] {
- Parameters [4] {
- Parameter #0 [ <required> $index ]
+ Parameter #0 [ <required> int $index ]
Parameter #1 [ <required> &$opsys ]
Parameter #2 [ <required> &$attr ]
- Parameter #3 [ <optional> $flags ]
- }
- }
-
- Method [ <internal:zip> public method setMtimeName ] {
-
- - Parameters [3] {
- Parameter #0 [ <required> $name ]
- Parameter #1 [ <required> $timestamp ]
- Parameter #2 [ <optional> $flags ]
- }
- }
-
- Method [ <internal:zip> public method setMtimeIndex ] {
-
- - Parameters [3] {
- Parameter #0 [ <required> $index ]
- Parameter #1 [ <required> $timestamp ]
- Parameter #2 [ <optional> $flags ]
+ Parameter #3 [ <optional> int $flags = 0 ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method setCompressionName ] {
- Parameters [3] {
- Parameter #0 [ <required> $name ]
- Parameter #1 [ <required> $method ]
- Parameter #2 [ <optional> $compflags ]
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <required> int $method ]
+ Parameter #2 [ <optional> int $compflags = 0 ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method setCompressionIndex ] {
- Parameters [3] {
- Parameter #0 [ <required> $index ]
- Parameter #1 [ <required> $method ]
- Parameter #2 [ <optional> $compflags ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <required> int $method ]
+ Parameter #2 [ <optional> int $compflags = 0 ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method setEncryptionName ] {
- Parameters [3] {
- Parameter #0 [ <required> $name ]
- Parameter #1 [ <required> $method ]
- Parameter #2 [ <optional> $password ]
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <required> int $method ]
+ Parameter #2 [ <optional> ?string $password = null ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method setEncryptionIndex ] {
- Parameters [3] {
- Parameter #0 [ <required> $index ]
- Parameter #1 [ <required> $method ]
- Parameter #2 [ <optional> $password ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <required> int $method ]
+ Parameter #2 [ <optional> ?string $password = null ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method registerProgressCallback ] {
- Parameters [2] {
- Parameter #0 [ <required> $rate ]
- Parameter #1 [ <required> $callback ]
+ Parameter #0 [ <required> float $rate ]
+ Parameter #1 [ <required> callable $callback ]
}
+ - Tentative return [ bool ]
}
Method [ <internal:zip> public method registerCancelCallback ] {
- Parameters [1] {
- Parameter #0 [ <required> $callback ]
+ Parameter #0 [ <required> callable $callback ]
}
+ - Tentative return [ bool ]
}
}
}
diff --git a/php-pecl-zip.spec b/php-pecl-zip.spec
index 398b4e4..aa4658f 100644
--- a/php-pecl-zip.spec
+++ b/php-pecl-zip.spec
@@ -3,26 +3,39 @@
#
# fedora spec file for php-pecl-zip
#
-# Copyright (c) 2013-2021 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2013-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
+%{?scl:%scl_package php-pecl-zip}
-%{?scl: %scl_package php-pecl-zip}
+# For PHP < 5.6 and EPEL-9
+%{!?__phpize: %global __phpize %{_bindir}/phpize}
+%{!?__ztsphpize: %global __ztsphpize %{_bindir}/zts-phpize}
+%{!?__phpconfig: %global __phpconfig %{_bindir}/php-config}
+%{!?__ztsphpconfig:%global __ztsphpconfig %{_bindir}/zts-php-config}
+
+%if ( 0%{?scl:1} && 0%{?rhel} == 8 ) || 0%{?rhel} >= 9
+%bcond_without move_to_opt
+%else
+%bcond_with move_to_opt
+%endif
+
+%bcond_without tests
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name zip
-%global upstream_version 1.20.0
-%global upstream_prever dev
-%global upstream_lower DEV
+%global upstream_version 1.22.3
+#global upstream_prever dev
+#global upstream_lower DEV
+%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global _configure ../%{sources}/configure
-%global libzip_version 1.8.0
+%global libzip_version 1.10.1
%if "%{php_version}" < "5.6"
%global ini_name %{pecl_name}.ini
@@ -34,12 +47,12 @@
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;')}}
-License: PHP
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+License: PHP-3.01
Group: Development/Languages
URL: https://pecl.php.net/package/zip
-Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -47,30 +60,30 @@ BuildRequires: %{?scl_prefix}php-devel
BuildRequires: zlib-devel
BuildRequires: %{?scl_prefix}php-pear
-%if 0%{?rhel} >= 8 && 0%{?scl:1}
-# use SCLized libzip
-BuildRequires: %{?scl_prefix}libzip-devel >= %{libzip_version}
-Requires: %{?scl_prefix}libzip%{?_isa} >= %{libzip_version}
+%if %{with move_to_opt}
+BuildRequires: %{?vendeur:%{vendeur}-}libzip-devel >= %{libzip_version}
+Requires: %{?vendeur:%{vendeur}-}libzip%{?_isa} >= %{libzip_version}
%global __requires_exclude ^libzip\\.so.*$
%else
# Ensure latest version is used
-BuildRequires: pkgconfig(libzip) >= %{libzip_version}
-%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8
-Requires: libzip%{?_isa} >= %{libzip_version}
+%if 0%{?rhel} == 7
+BuildRequires: libzip5-devel >= %{libzip_version}
+Requires: libzip5%{?_isa} >= %{libzip_version}
%else
-Requires: libzip5%{?_isa} >= %{libzip_version}
+BuildRequires: libzip-devel >= %{libzip_version}
+Requires: libzip%{?_isa} >= %{libzip_version}
%endif
%endif
+
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version}-%{release}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version}-%{release}
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7
# Other third party repo stuff
Obsoletes: php53-pecl-%{pecl_name} <= %{version}
Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
@@ -104,12 +117,6 @@ Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
%endif
%if "%{php_version}" > "7.0"
@@ -127,53 +134,57 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -c -q
-mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
+cd %{sources}
# 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
: Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}.
exit 1
fi
-
cd ..
+
: Create the configuration file
cat >%{ini_name} << 'EOF'
; Enable ZIP extension module
extension=%{pecl_name}.so
EOF
+mkdir NTS
%if %{with_zts}
-: Duplicate sources tree for ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+%if %{with move_to_opt}
+export PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}libzip/%{_lib}/pkgconfig
+%endif
+
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
--with-libzip \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
--with-libzip \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -194,42 +205,45 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Documentation
-cd NTS
+cd %{sources}
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
%check
+cd %{sources}
OPT="-q --show-diff"
%if "%{php_version}" > "8.0"
OPT="$OPT %{?_smp_mflags}"
%endif
-cd NTS
: minimal load test of NTS extension
-%{_bindir}/php --no-php-ini \
+%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
+%if %{with tests}
: upstream test suite for NTS extension
-TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
+TEST_PHP_ARGS="-n -d extension_dir=$PWD/../NTS/modules -d extension=%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-TEST_PHP_EXECUTABLE=%{_bindir}/php \
-%{_bindir}/php -n run-tests.php $OPT
+TEST_PHP_EXECUTABLE=%{__php} \
+%{__php} -n run-tests.php $OPT
+%endif
%if %{with_zts}
-cd ../ZTS
: minimal load test of ZTS extension
-%{_bindir}/zts-php --no-php-ini \
+%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
+%if %{with tests}
: upstream test suite for ZTS extension
-TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
+TEST_PHP_ARGS="-n -d extension_dir=$PWD/../ZTS/modules -d extension=%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \
-%{_bindir}/zts-php -n run-tests.php $OPT
+TEST_PHP_EXECUTABLE=%{__ztsphp} \
+%{__ztsphp} -n run-tests.php $OPT
+%endif
%endif
@@ -254,7 +268,7 @@ fi
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -268,6 +282,59 @@ fi
%changelog
+* Tue Nov 14 2023 Remi Collet <remi@remirepo.net> - 1.22.3-1
+- update to 1.22.3
+- build out of sources tree
+
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.22.2-2
+- rebuild for PHP 8.3.0RC1
+
+* Wed Aug 23 2023 Remi Collet <remi@remirepo.net> - 1.22.2-1
+- update to 1.22.2
+
+* Thu Jun 29 2023 Remi Collet <remi@remirepo.net> - 1.22.1-1
+- update to 1.22.1
+
+* Mon Jun 26 2023 Remi Collet <remi@remirepo.net> - 1.22.0-1
+- update to 1.22.0
+
+* Mon Jun 5 2023 Remi Collet <remi@remirepo.net> - 1.21.1-2
+- add upstream patches for 8.3
+
+* Fri Sep 16 2022 Remi Collet <remi@remirepo.net> - 1.21.1-1
+- update to 1.21.1
+
+* Thu Sep 1 2022 Remi Collet <remi@remirepo.net> - 1.21.0-5
+- rebuild for PHP 8.2.0RC1
+
+* Wed Jul 20 2022 Remi Collet <remi@remirepo.net> - 1.21.0-4
+- add upstream patch for 8.2.0beta1
+
+* Wed Jun 29 2022 Remi Collet <remi@remirepo.net> - 1.21.0-3
+- require minimal libzip version
+- rebuild using libzip5 on EL-7
+
+* Tue Jun 28 2022 Remi Collet <remi@remirepo.net> - 1.21.0-2
+- rebuild using libzip 1.9.2 (remi-libzip on EL)
+
+* 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
+
+* Mon May 2 2022 Remi Collet <remi@remirepo.net> - 1.20.1-1
+- update to 1.20.1
+
+* Mon Nov 8 2021 Remi Collet <remi@remirepo.net> - 1.20.0-2
+- use remi-libzip on EL-9
+
+* Tue Oct 12 2021 Remi Collet <remi@remirepo.net> - 1.20.0-1
+- update to 1.20.0
+
* Tue Oct 12 2021 Remi Collet <remi@remirepo.net> - 1.20.0~DEV-2
- test build for 1.20.0-dev