From d244614b2d7051089e5abc8f890ccd68fdd686cd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 26 May 2023 08:12:06 +0200 Subject: update to 3.2.0 --- PHPINFO | 6 ++++ REFLECTION | 92 ++++++++++++++++++++++++++++++++++++++++------------ bitset-php82.patch | 25 -------------- php-pecl-bitset.spec | 34 +++++++++---------- 4 files changed, 94 insertions(+), 63 deletions(-) create mode 100644 PHPINFO delete mode 100644 bitset-php82.patch diff --git a/PHPINFO b/PHPINFO new file mode 100644 index 0000000..05203f5 --- /dev/null +++ b/PHPINFO @@ -0,0 +1,6 @@ + +bitset + +BitSet Support => enabled +BitSet Version => 3.2.0 +64-bit Integer Support => yes diff --git a/REFLECTION b/REFLECTION index 51222ff..9d93119 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,7 +1,7 @@ -Extension [ extension #76 bitset version 3.0.1 ] { +Extension [ extension #122 bitset version 3.2.0 ] { - Classes [1] { - Class [ class BitSet ] { + Class [ class BitSet implements Stringable ] { - Constants [0] { } @@ -9,153 +9,203 @@ Extension [ extension #76 bitset version 3.0.1 ] { - Static properties [0] { } - - Static methods [3] { + - Static methods [4] { Method [ static public method fromArray ] { - Parameters [1] { - Parameter #0 [ $arr ] + Parameter #0 [ array $arr ] } + - Return [ BitSet ] + } + + Method [ static public method fromInteger ] { + + - Parameters [1] { + Parameter #0 [ int $value ] + } + - Return [ BitSet ] } Method [ static public method fromString ] { - Parameters [1] { - Parameter #0 [ $str ] + Parameter #0 [ string $str ] } + - Return [ BitSet ] } Method [ static public method fromRawValue ] { - Parameters [1] { - Parameter #0 [ $str ] + Parameter #0 [ string $str ] } + - Return [ BitSet ] } } - Properties [0] { } - - Methods [20] { + - Methods [21] { Method [ public method __construct ] { - Parameters [1] { - Parameter #0 [ $value ] + Parameter #0 [ int $value = 0 ] } } Method [ public method andOp ] { - - Parameters [0] { + - Parameters [1] { + Parameter #0 [ BitSet $set ] } + - Return [ void ] } Method [ public method andNotOp ] { - - Parameters [0] { + - Parameters [1] { + Parameter #0 [ BitSet $set ] } + - Return [ void ] } Method [ public method cardinality ] { - Parameters [0] { } + - Return [ int ] } Method [ public method clear ] { - - Parameters [0] { + - Parameters [2] { + Parameter #0 [ int $from = -1 ] + Parameter #1 [ int $to = 0 ] } + - Return [ void ] } Method [ public method get ] { - Parameters [1] { - Parameter #0 [ $index ] + Parameter #0 [ int $index ] } + - Return [ bool ] } Method [ public method getRawValue ] { - Parameters [0] { } + - Return [ string ] } Method [ public method intersects ] { - - Parameters [0] { + - Parameters [1] { + Parameter #0 [ BitSet $set ] } + - Return [ bool ] } Method [ public method isEmpty ] { - Parameters [0] { } + - Return [ bool ] } Method [ public method length ] { - Parameters [0] { } + - Return [ int ] } Method [ public method nextClearBit ] { - - Parameters [0] { + - Parameters [1] { + Parameter #0 [ int $start ] } + - Return [ int|bool ] } Method [ public method nextSetBit ] { - - Parameters [0] { + - Parameters [1] { + Parameter #0 [ int $start ] } + - Return [ int|bool ] } Method [ public method orOp ] { - - Parameters [0] { + - Parameters [1] { + Parameter #0 [ BitSet $set ] } + - Return [ void ] } Method [ public method previousClearBit ] { - - Parameters [0] { + - Parameters [1] { + Parameter #0 [ int $start ] } + - Return [ int|bool ] } Method [ public method previousSetBit ] { - - Parameters [0] { + - Parameters [1] { + Parameter #0 [ int $start ] } + - Return [ int|bool ] } Method [ public method set ] { - - Parameters [0] { + - Parameters [2] { + Parameter #0 [ int $from = -1 ] + Parameter #1 [ int $to = 0 ] } + - Return [ void ] } Method [ public method size ] { - Parameters [0] { } + - Return [ int ] } Method [ public method toArray ] { - Parameters [0] { } + - Return [ array ] } - Method [ public method xorOp ] { + Method [ public method toInteger ] { - Parameters [0] { } + - Return [ int ] + } + + Method [ public method xorOp ] { + + - Parameters [1] { + Parameter #0 [ BitSet $set ] + } + - Return [ void ] } - Method [ public method __toString ] { + Method [ public method __toString ] { - Parameters [0] { } + - Return [ string ] } } } diff --git a/bitset-php82.patch b/bitset-php82.patch deleted file mode 100644 index 4851cf0..0000000 --- a/bitset-php82.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 39a70cb32da68b14a704f8a9c41a911029596e70 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Fri, 9 Sep 2022 16:16:18 +0200 -Subject: [PATCH] Fix __toString prototype with PHP 8.2 - ---- - bitset.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/bitset.c b/bitset.c -index 82765e1..a744d69 100644 ---- a/bitset.c -+++ b/bitset.c -@@ -118,7 +118,11 @@ ZEND_END_ARG_INFO() - ZEND_BEGIN_ARG_INFO(arginfo_bitset_xorop, 0) - ZEND_END_ARG_INFO() - -+#if PHP_VERSION_ID >= 80200 -+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bitset___tostring, 0, 0, IS_STRING, 0) -+#else - ZEND_BEGIN_ARG_INFO(arginfo_bitset___tostring, 0) -+#endif - ZEND_END_ARG_INFO() - - ZEND_BEGIN_ARG_INFO(arginfo_bitset_getrawvalue, 0) diff --git a/php-pecl-bitset.spec b/php-pecl-bitset.spec index 75c15e9..47a0e72 100644 --- a/php-pecl-bitset.spec +++ b/php-pecl-bitset.spec @@ -1,7 +1,7 @@ # remirepo spec file for php-pecl-bitset # -# Copyright (c) 2014-2022 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2014-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries @@ -15,15 +15,12 @@ Summary: BITSET library Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 3.0.1 -Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -License: PHP -Group: Development/Languages +Version: 3.2.0 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License: PHP-3.01 URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz -Patch0: %{pecl_name}-php82.patch - BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 @@ -55,8 +52,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch0 -p1 -b .pr14 - # Sanity check, really often broken extver=$(sed -n '/#define PHP_BITSET_VERSION/{s/.* "//;s/".*$//;p}' php_bitset.h) if test "x${extver}" != "x%{version}"; then @@ -143,15 +138,14 @@ cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' %if %{with tests} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php --show-diff +%{__php} -n run-tests.php -q --show-diff %endif %if %{with_zts} @@ -159,15 +153,14 @@ cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' %if %{with tests} : Upstream test suite for ZTS extension -TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \ +TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ -%{_bindir}/zts-php -n run-tests.php --show-diff +%{__ztsphp} -n run-tests.php -q --show-diff %endif %endif @@ -187,6 +180,13 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Fri May 26 2023 Remi Collet - 3.2.0-1 +- update to 3.2.0 + +* Thu May 25 2023 Remi Collet - 3.1.0-1 +- update to 3.1.0 +- drop patch merged upstream + * Fri Sep 9 2022 Remi Collet - 3.0.1-6 - add patch for PHP 8.2 from https://github.com/php/pecl-numbers-bitset/pull/14 -- cgit