From a4d6d80f5567ae6aefb720977c00bcf5410af504 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 15 Nov 2023 10:09:28 +0100 Subject: update to 1.17.0 raise dependency on PHP 7.4 EL use bundled libbson and libmongc 1.25.1 EL use bundled libmongocrypt 1.8.2 open https://github.com/mongodb/mongo-php-driver/pull/1490 drop ICU information --- PHPINFO | 16 +++--- REFLECTION | 139 ++++++++++++++++++++++++++++++++++++++++++++------ php-pecl-mongodb.spec | 49 +++++++++++++----- 3 files changed, 167 insertions(+), 37 deletions(-) diff --git a/PHPINFO b/PHPINFO index 65f355c..e2b490d 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,25 +2,25 @@ mongodb MongoDB support => enabled -MongoDB extension version => 1.16.2 +MongoDB extension version => 1.17.0 MongoDB extension stability => stable -libbson headers version => 1.24.2 -libbson library version => 1.24.3 -libmongoc headers version => 1.24.2 -libmongoc library version => 1.24.3 +libbson headers version => 1.25.1 +libbson library version => 1.25.1 +libmongoc headers version => 1.25.1 +libmongoc library version => 1.25.1 libmongoc SSL => enabled libmongoc SSL library => OpenSSL libmongoc crypto => enabled libmongoc crypto library => libcrypto libmongoc crypto system profile => enabled libmongoc SASL => enabled -libmongoc ICU => enabled +libmongoc ICU => disabled libmongoc compression => enabled libmongoc compression snappy => enabled libmongoc compression zlib => enabled libmongoc compression zstd => enabled -libmongocrypt headers version => 1.8.1 -libmongocrypt library version => 1.8.1 +libmongocrypt headers version => 1.8.2 +libmongocrypt library version => 1.8.2 libmongocrypt crypto => enabled libmongocrypt crypto library => libcrypto crypt_shared library version => unknown diff --git a/REFLECTION b/REFLECTION index 983872f..d7037fd 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #118 mongodb version 1.16.2 ] { +Extension [ extension #119 mongodb version 1.17.0 ] { - Dependencies { Dependency [ date (Required) ] @@ -14,7 +14,7 @@ Extension [ extension #118 mongodb version 1.16.2 ] { } - Constants [2] { - Constant [ string MONGODB_VERSION ] { 1.16.2 } + Constant [ string MONGODB_VERSION ] { 1.17.0 } Constant [ string MONGODB_STABILITY ] { stable } } @@ -69,6 +69,15 @@ Extension [ extension #118 mongodb version 1.16.2 ] { } - Return [ void ] } + Function [ function MongoDB\Driver\Monitoring\mongoc_log ] { + + - Parameters [3] { + Parameter #0 [ int $level ] + Parameter #1 [ string $domain ] + Parameter #2 [ string $message ] + } + - Return [ void ] + } Function [ function MongoDB\Driver\Monitoring\removeSubscriber ] { - Parameters [1] { @@ -78,7 +87,7 @@ Extension [ extension #118 mongodb version 1.16.2 ] { } } - - Classes [78] { + - Classes [79] { Interface [ interface MongoDB\BSON\Type ] { - Constants [0] { @@ -116,7 +125,7 @@ Extension [ extension #118 mongodb version 1.16.2 ] { - Parameters [0] { } - - Tentative return [ object|array ] + - Tentative return [ stdClass|MongoDB\BSON\Document|MongoDB\BSON\PackedArray|array ] } } } @@ -485,7 +494,7 @@ Extension [ extension #118 mongodb version 1.16.2 ] { } } - Class [ final class MongoDB\BSON\PackedArray implements Stringable, IteratorAggregate, Traversable, Serializable ] { + Class [ final class MongoDB\BSON\PackedArray implements Stringable, IteratorAggregate, Traversable, Serializable, ArrayAccess, MongoDB\BSON\Type ] { - Constants [0] { } @@ -514,7 +523,7 @@ Extension [ extension #118 mongodb version 1.16.2 ] { - Properties [0] { } - - Methods [10] { + - Methods [14] { Method [ private method __construct ] { - Parameters [0] { @@ -552,6 +561,39 @@ Extension [ extension #118 mongodb version 1.16.2 ] { - Return [ object|array ] } + Method [ public method offsetExists ] { + + - Parameters [1] { + Parameter #0 [ mixed $key ] + } + - Return [ bool ] + } + + Method [ public method offsetGet ] { + + - Parameters [1] { + Parameter #0 [ mixed $key ] + } + - Return [ mixed ] + } + + Method [ public method offsetSet ] { + + - Parameters [2] { + Parameter #0 [ mixed $key ] + Parameter #1 [ mixed $value ] + } + - Return [ void ] + } + + Method [ public method offsetUnset ] { + + - Parameters [1] { + Parameter #0 [ mixed $key ] + } + - Return [ void ] + } + Method [ final public method __toString ] { - Parameters [0] { @@ -591,7 +633,7 @@ Extension [ extension #118 mongodb version 1.16.2 ] { } } - Class [ final class MongoDB\BSON\Document implements Stringable, IteratorAggregate, Traversable, Serializable ] { + Class [ final class MongoDB\BSON\Document implements Stringable, IteratorAggregate, Traversable, Serializable, ArrayAccess, MongoDB\BSON\Type ] { - Constants [0] { } @@ -636,7 +678,7 @@ Extension [ extension #118 mongodb version 1.16.2 ] { - Properties [0] { } - - Methods [12] { + - Methods [16] { Method [ private method __construct ] { - Parameters [0] { @@ -688,6 +730,39 @@ Extension [ extension #118 mongodb version 1.16.2 ] { - Return [ string ] } + Method [ public method offsetExists ] { + + - Parameters [1] { + Parameter #0 [ mixed $key ] + } + - Return [ bool ] + } + + Method [ public method offsetGet ] { + + - Parameters [1] { + Parameter #0 [ mixed $key ] + } + - Return [ mixed ] + } + + Method [ public method offsetSet ] { + + - Parameters [2] { + Parameter #0 [ mixed $key ] + Parameter #1 [ mixed $value ] + } + - Return [ void ] + } + + Method [ public method offsetUnset ] { + + - Parameters [1] { + Parameter #0 [ mixed $key ] + } + - Return [ void ] + } + Method [ final public method __toString ] { - Parameters [0] { @@ -729,7 +804,7 @@ Extension [ extension #118 mongodb version 1.16.2 ] { Class [ final class MongoDB\BSON\Binary implements Stringable, MongoDB\BSON\BinaryInterface, JsonSerializable, MongoDB\BSON\Type, Serializable ] { - - Constants [9] { + - Constants [10] { Constant [ public int TYPE_GENERIC ] { 0 } Constant [ public int TYPE_FUNCTION ] { 1 } Constant [ public int TYPE_OLD_BINARY ] { 2 } @@ -738,6 +813,7 @@ Extension [ extension #118 mongodb version 1.16.2 ] { Constant [ public int TYPE_MD5 ] { 5 } Constant [ public int TYPE_ENCRYPTED ] { 6 } Constant [ public int TYPE_COLUMN ] { 7 } + Constant [ public int TYPE_SENSITIVE ] { 8 } Constant [ public int TYPE_USER_DEFINED ] { 128 } } @@ -1359,11 +1435,11 @@ Extension [ extension #118 mongodb version 1.16.2 ] { } - Methods [2] { - Method [ abstract public method bsonSerialize ] { + Method [ abstract public method bsonSerialize ] { - Parameters [0] { } - - Tentative return [ object|array ] + - Tentative return [ stdClass|MongoDB\BSON\Document|array ] } Method [ abstract public method bsonUnserialize ] { @@ -2487,7 +2563,7 @@ Extension [ extension #118 mongodb version 1.16.2 ] { - Parameters [0] { } - - Return [ object|array ] + - Return [ stdClass ] } Method [ final public method serialize ] { @@ -2604,7 +2680,7 @@ Extension [ extension #118 mongodb version 1.16.2 ] { - Parameters [0] { } - - Return [ object|array ] + - Return [ stdClass ] } Method [ final public method serialize ] { @@ -2859,7 +2935,7 @@ Extension [ extension #118 mongodb version 1.16.2 ] { - Parameters [0] { } - - Return [ object|array ] + - Return [ stdClass ] } Method [ final public method serialize ] { @@ -3241,7 +3317,7 @@ Extension [ extension #118 mongodb version 1.16.2 ] { - Parameters [0] { } - - Return [ object|array ] + - Return [ stdClass ] } Method [ final public method serialize ] { @@ -5299,6 +5375,39 @@ Extension [ extension #118 mongodb version 1.16.2 ] { } } + Interface [ interface MongoDB\Driver\Monitoring\LogSubscriber extends MongoDB\Driver\Monitoring\Subscriber ] { + + - Constants [6] { + Constant [ public int LEVEL_ERROR ] { 0 } + Constant [ public int LEVEL_CRITICAL ] { 1 } + Constant [ public int LEVEL_WARNING ] { 2 } + Constant [ public int LEVEL_MESSAGE ] { 3 } + Constant [ public int LEVEL_INFO ] { 4 } + Constant [ public int LEVEL_DEBUG ] { 5 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [1] { + Method [ abstract public method log ] { + + - Parameters [3] { + Parameter #0 [ int $level ] + Parameter #1 [ string $domain ] + Parameter #2 [ string $message ] + } + - Return [ void ] + } + } + } + Interface [ interface MongoDB\Driver\Monitoring\SDAMSubscriber extends MongoDB\Driver\Monitoring\Subscriber ] { - Constants [0] { diff --git a/php-pecl-mongodb.spec b/php-pecl-mongodb.spec index b2b888b..102ef8e 100644 --- a/php-pecl-mongodb.spec +++ b/php-pecl-mongodb.spec @@ -25,20 +25,20 @@ %bcond_with tests # temp for EL until available in EPEL -%if 0%{?fedora} >= 36 || 0%{?rhel} >= 8 +%if 0%{?fedora} >= 37 %bcond_without syslib %else %bcond_with syslib %endif # Bundled versions -%global bundled_libmongo 1.24.3 -%global bundled_libcrypt 1.8.1 +%global bundled_libmongo 1.25.1 +%global bundled_libcrypt 1.8.2 %if %{with syslib} # Build dependencies -%global system_libmongo 1.24.1 -%global system_libcrypt 1.8.1 +%global system_libmongo 1.25.1 +%global system_libcrypt 1.8.2 # Runtime dependencies %global runtime_libmongo %(pkg-config --silence-errors --modversion libmongoc-1.0 2>/dev/null || echo %{system_libmongo}) %global runtime_libcrypt %(pkg-config --silence-errors --modversion libmongocrypt 2>/dev/null || echo %{system_libcrypt}) @@ -46,13 +46,13 @@ Summary: MongoDB driver for PHP Name: %{?scl_prefix}php-pecl-%{pecl_name} -%global upstream_version 1.16.2 +%global upstream_version 1.17.0 #global upstream_prever beta1 #global upstream_lower ~beta1 %global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} %global _configure ../%{sources}/configure Version: %{upstream_version}%{?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;')}} %if %{with syslib} License: Apache-2.0 %else @@ -63,7 +63,7 @@ Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upst BuildRequires: make BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel >= 7.2 +BuildRequires: %{?scl_prefix}php-devel >= 7.4 BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-json %if %{with syslib} @@ -74,13 +74,20 @@ Requires: libbson%{?_isa} >= %{runtime_libmongo} Requires: mongo-c-driver-libs%{?_isa} >= %{runtime_libmongo} Requires: libmongocrypt%{?_isa} >= %{runtime_libcrypt} %else -BuildRequires: cyrus-sasl-devel BuildRequires: openssl-devel -BuildRequires: libzstd-devel +BuildRequires: pkgconfig(libsasl2) +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(zlib) +%if 0%{?rhel} == 7 BuildRequires: snappy-devel -BuildRequires: zlib-devel -# We require 72 to ensure we use the same version than PHP -BuildRequires: pkgconfig(icu-uc) >= 72 +BuildRequires: utf8proc-devel +%else +BuildRequires: pkgconfig(snappy) +%if 0%{?rhel} == 9 || 0%{?fedora} +# EL-8 will use bundled as only in subversion module +BuildRequires: pkgconfig(libutf8proc) +%endif +%endif Provides: bundled(libbson) = %{bundled_libmongo} Provides: bundled(mongo-c-driver) = %{bundled_libmongo} Provides: bundled(libmongocrypt) = %{bundled_libcrypt} @@ -177,9 +184,16 @@ peclbuild() { --with-mongodb-system-libs \ %else --enable-mongodb-crypto-system-profile \ + --with-mongodb-snappy \ + --with-mongodb-zlib \ + --with-mongodb-zstd \ --with-mongodb-sasl=cyrus \ - --with-mongodb-icu=yes \ --with-mongodb-ssl=openssl \ +%if 0%{?rhel} == 8 + --with-mongodb-utf8proc=bundled \ +%else + --with-mongodb-utf8proc=system \ +%endif %endif --with-php-config=${1} \ --with-mongodb-client-side-encryption \ @@ -329,6 +343,13 @@ exit $ret %changelog +* Wed Nov 15 2023 Remi Collet - 1.17.0-1 +- update to 1.17.0 +- raise dependency on PHP 7.4 +- EL use bundled libbson and libmongc 1.25.1 +- EL use bundled libmongocrypt 1.8.2 +- open https://github.com/mongodb/mongo-php-driver/pull/1490 drop ICU information + * Wed Aug 30 2023 Remi Collet - 1.16.2-2 - rebuild for PHP 8.3.0RC1 -- cgit