From eae195f6d7bc58f738ef3c394f64e92edb2add4a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 25 Feb 2019 11:54:24 +0100 Subject: update to 4.2.1RC1 (alpha) --- 7b8b7b01a2b2af2e646ca89802910ac216c476dc.patch | 70 ----------- PHPINFO | 8 +- REFLECTION | 157 +++++++++++++++++++++++-- php-pecl-redis4.spec | 20 ++-- 4 files changed, 168 insertions(+), 87 deletions(-) delete mode 100644 7b8b7b01a2b2af2e646ca89802910ac216c476dc.patch diff --git a/7b8b7b01a2b2af2e646ca89802910ac216c476dc.patch b/7b8b7b01a2b2af2e646ca89802910ac216c476dc.patch deleted file mode 100644 index 995b579..0000000 --- a/7b8b7b01a2b2af2e646ca89802910ac216c476dc.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 7b8b7b01a2b2af2e646ca89802910ac216c476dc Mon Sep 17 00:00:00 2001 -From: michael-grunder -Date: Sat, 8 Dec 2018 15:10:34 -0800 -Subject: [PATCH] Fix unit tests for Redis 5.0.2 - -Addresses issue #1472 ---- - tests/RedisTest.php | 20 ++++++++++++++------ - 1 file changed, 14 insertions(+), 6 deletions(-) - -diff --git a/tests/RedisTest.php b/tests/RedisTest.php -index 5f23a76a..8c358b6e 100644 ---- a/tests/RedisTest.php -+++ b/tests/RedisTest.php -@@ -5392,7 +5392,7 @@ public function testXAck() { - - for ($n = 1; $n <= 3; $n++) { - $this->addStreamsAndGroups(Array('{s}'), 3, Array('g1' => 0)); -- $msg = $this->redis->xReadGroup('g1', 'c1', Array('{s}' => 0)); -+ $msg = $this->redis->xReadGroup('g1', 'c1', Array('{s}' => '>')); - - /* Extract IDs */ - $smsg = array_shift($msg); -@@ -5494,17 +5494,25 @@ public function testXReadGroup() { - - /* Create some streams and groups */ - $streams = Array('{s}-1', '{s}-2'); -- $qstreams = Array('{s}-1' => 0, '{s}-2' => 0); - $groups = Array('g1' => 0, 'g2' => 0); - -- $ids = $this->addStreamsAndGroups($streams, 3, $groups); -+ /* I'm not totally sure why Redis behaves this way, but we have to -+ * send '>' first and then send ID '0' for subsequent xReadGroup calls -+ * or Redis will not return any messages. This behavior changed from -+ * redis 5.0.1 and 5.0.2 but doing it this way works for both versions. */ -+ $qcount = 0; -+ $query1 = Array('{s}-1' => '>', '{s}-2' => '>'); -+ $query2 = Array('{s}-1' => '0', '{s}-2' => '0'); -+ -+ $ids = $this->addStreamsAndGroups($streams, 1, $groups); - - /* Test that we get get the IDs we should */ - foreach (Array('g1', 'g2') as $group) { - foreach ($ids as $stream => $messages) { - while ($ids[$stream]) { - /* Read more messages */ -- $resp = $this->redis->xReadGroup($group, 'consumer', $qstreams); -+ $query = !$qcount++ ? $query1 : $query2; -+ $resp = $this->redis->xReadGroup($group, 'consumer', $query); - - /* They should match with our local control array */ - $this->compareStreamIds($resp, $ids); -@@ -5519,7 +5527,7 @@ public function testXReadGroup() { - /* Test COUNT option */ - for ($c = 1; $c <= 3; $c++) { - $this->addStreamsAndGroups($streams, 3, $groups); -- $resp = $this->redis->xReadGroup('g1', 'consumer', $qstreams, $c); -+ $resp = $this->redis->xReadGroup('g1', 'consumer', $query1, $c); - - foreach ($resp as $stream => $smsg) { - $this->assertEquals(count($smsg), $c); -@@ -5624,7 +5632,7 @@ public function testXClaim() { - $fids = $fids['f']; - - /* Have consumer 'Mike' read the messages */ -- $oids = $this->redis->xReadGroup('group1', 'Mike', Array('s' => 0)); -+ $oids = $this->redis->xReadGroup('group1', 'Mike', Array('s' => '>')); - $oids = array_keys($oids['s']); /* We're only dealing with stream 's' */ - - /* Construct our options array */ diff --git a/PHPINFO b/PHPINFO index 55caa14..db7841f 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,11 +2,13 @@ redis Redis Support => enabled -Redis Version => 4.2.0 +Redis Version => 4.2.1RC1 Available serializers => php, igbinary Available compression => lzf Directive => Local Value => Master Value +redis.arrays.algorithm => no value => no value +redis.arrays.auth => no value => no value redis.arrays.autorehash => 0 => 0 redis.arrays.connecttimeout => 0 => 0 redis.arrays.distributor => no value => no value @@ -19,10 +21,14 @@ redis.arrays.pconnect => 0 => 0 redis.arrays.previous => no value => no value redis.arrays.readtimeout => 0 => 0 redis.arrays.retryinterval => 0 => 0 +redis.arrays.consistent => 0 => 0 +redis.clusters.auth => no value => no value redis.clusters.persistent => 0 => 0 redis.clusters.read_timeout => 0 => 0 redis.clusters.seeds => no value => no value redis.clusters.timeout => 0 => 0 +redis.pconnect.pooling_enabled => 0 => 0 +redis.pconnect.connection_limit => 0 => 0 redis.session.locking_enabled => 0 => 0 redis.session.lock_expire => 0 => 0 redis.session.lock_retries => 10 => 10 diff --git a/REFLECTION b/REFLECTION index 87d2fa1..c013251 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #194 redis version 4.2.0 ] { +Extension [ extension #195 redis version 4.2.1RC1 ] { - Dependencies { Dependency [ igbinary (Required) ] @@ -6,6 +6,12 @@ Extension [ extension #194 redis version 4.2.0 ] { } - INI { + Entry [ redis.arrays.algorithm ] + Current = '' + } + Entry [ redis.arrays.auth ] + Current = '' + } Entry [ redis.arrays.autorehash ] Current = '0' } @@ -42,6 +48,12 @@ Extension [ extension #194 redis version 4.2.0 ] { Entry [ redis.arrays.retryinterval ] Current = '0' } + Entry [ redis.arrays.consistent ] + Current = '0' + } + Entry [ redis.clusters.auth ] + Current = '' + } Entry [ redis.clusters.persistent ] Current = '0' } @@ -54,6 +66,12 @@ Extension [ extension #194 redis version 4.2.0 ] { Entry [ redis.clusters.timeout ] Current = '0' } + Entry [ redis.pconnect.pooling_enabled ] + Current = '0' + } + Entry [ redis.pconnect.connection_limit ] + Current = '0' + } Entry [ redis.session.locking_enabled ] Current = '0' } @@ -107,7 +125,7 @@ Extension [ extension #194 redis version 4.2.0 ] { - Properties [0] { } - - Methods [228] { + - Methods [234] { Method [ public method __construct ] { - Parameters [0] { @@ -222,6 +240,24 @@ Extension [ extension #194 redis version 4.2.0 ] { } } + Method [ public method bzPopMax ] { + + - Parameters [3] { + Parameter #0 [ $key ] + Parameter #1 [ $timeout_or_key ] + Parameter #2 [ ...$extra_args ] + } + } + + Method [ public method bzPopMin ] { + + - Parameters [3] { + Parameter #0 [ $key ] + Parameter #1 [ $timeout_or_key ] + Parameter #2 [ ...$extra_args ] + } + } + Method [ public method clearLastError ] { - Parameters [0] { @@ -429,6 +465,18 @@ Extension [ extension #194 redis version 4.2.0 ] { } } + Method [ public method georadius_ro ] { + + - Parameters [6] { + Parameter #0 [ $key ] + Parameter #1 [ $lng ] + Parameter #2 [ $lan ] + Parameter #3 [ $radius ] + Parameter #4 [ $unit ] + Parameter #5 [ array $opts ] + } + } + Method [ public method georadiusbymember ] { - Parameters [5] { @@ -440,6 +488,17 @@ Extension [ extension #194 redis version 4.2.0 ] { } } + Method [ public method georadiusbymember_ro ] { + + - Parameters [5] { + Parameter #0 [ $key ] + Parameter #1 [ $member ] + Parameter #2 [ $radius ] + Parameter #3 [ $unit ] + Parameter #4 [ array $opts ] + } + } + Method [ public method get ] { - Parameters [1] { @@ -924,8 +983,9 @@ Extension [ extension #194 redis version 4.2.0 ] { Method [ public method psubscribe ] { - - Parameters [1] { + - Parameters [2] { Parameter #0 [ array $patterns ] + Parameter #1 [ $callback ] } } @@ -1339,8 +1399,9 @@ Extension [ extension #194 redis version 4.2.0 ] { Method [ public method subscribe ] { - - Parameters [1] { + - Parameters [2] { Parameter #0 [ array $channels ] + Parameter #1 [ $callback ] } } @@ -1733,6 +1794,20 @@ Extension [ extension #194 redis version 4.2.0 ] { } } + Method [ public method zPopMax ] { + + - Parameters [1] { + Parameter #0 [ $key ] + } + } + + Method [ public method zPopMin ] { + + - Parameters [1] { + Parameter #0 [ $key ] + } + } + Method [ public method del ] { - Parameters [2] { @@ -1995,7 +2070,7 @@ Extension [ extension #194 redis version 4.2.0 ] { - Properties [0] { } - - Methods [28] { + - Methods [29] { Method [ public method __call ] { - Parameters [2] { @@ -2012,6 +2087,12 @@ Extension [ extension #194 redis version 4.2.0 ] { } } + Method [ public method _continuum ] { + + - Parameters [0] { + } + } + Method [ public method _distributor ] { - Parameters [0] { @@ -2229,15 +2310,16 @@ Extension [ extension #194 redis version 4.2.0 ] { - Properties [0] { } - - Methods [179] { + - Methods [185] { Method [ public method __construct ] { - - Parameters [5] { + - Parameters [6] { Parameter #0 [ $name ] Parameter #1 [ array $seeds ] Parameter #2 [ $timeout ] Parameter #3 [ $read_timeout ] Parameter #4 [ $persistent ] + Parameter #5 [ $auth ] } } @@ -2356,6 +2438,24 @@ Extension [ extension #194 redis version 4.2.0 ] { } } + Method [ public method bzpopmax ] { + + - Parameters [3] { + Parameter #0 [ $key ] + Parameter #1 [ $timeout_or_key ] + Parameter #2 [ ...$extra_args ] + } + } + + Method [ public method bzpopmin ] { + + - Parameters [3] { + Parameter #0 [ $key ] + Parameter #1 [ $timeout_or_key ] + Parameter #2 [ ...$extra_args ] + } + } + Method [ public method client ] { - Parameters [3] { @@ -2560,6 +2660,18 @@ Extension [ extension #194 redis version 4.2.0 ] { } } + Method [ public method georadius_ro ] { + + - Parameters [6] { + Parameter #0 [ $key ] + Parameter #1 [ $lng ] + Parameter #2 [ $lan ] + Parameter #3 [ $radius ] + Parameter #4 [ $unit ] + Parameter #5 [ array $opts ] + } + } + Method [ public method georadiusbymember ] { - Parameters [5] { @@ -2571,6 +2683,17 @@ Extension [ extension #194 redis version 4.2.0 ] { } } + Method [ public method georadiusbymember_ro ] { + + - Parameters [5] { + Parameter #0 [ $key ] + Parameter #1 [ $member ] + Parameter #2 [ $radius ] + Parameter #3 [ $unit ] + Parameter #4 [ array $opts ] + } + } + Method [ public method get ] { - Parameters [1] { @@ -2980,8 +3103,9 @@ Extension [ extension #194 redis version 4.2.0 ] { Method [ public method psubscribe ] { - - Parameters [1] { + - Parameters [2] { Parameter #0 [ array $patterns ] + Parameter #1 [ $callback ] } } @@ -3312,8 +3436,9 @@ Extension [ extension #194 redis version 4.2.0 ] { Method [ public method subscribe ] { - - Parameters [1] { + - Parameters [2] { Parameter #0 [ array $channels ] + Parameter #1 [ $callback ] } } @@ -3565,6 +3690,20 @@ Extension [ extension #194 redis version 4.2.0 ] { } } + Method [ public method zpopmax ] { + + - Parameters [1] { + Parameter #0 [ $key ] + } + } + + Method [ public method zpopmin ] { + + - Parameters [1] { + Parameter #0 [ $key ] + } + } + Method [ public method zrange ] { - Parameters [4] { diff --git a/php-pecl-redis4.spec b/php-pecl-redis4.spec index 0d433bc..ec37cc8 100644 --- a/php-pecl-redis4.spec +++ b/php-pecl-redis4.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-redis4 # -# Copyright (c) 2012-2018 Remi Collet +# Copyright (c) 2012-2019 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -28,19 +28,17 @@ # after 40-igbinary %global ini_name 50-%{pecl_name}.ini %endif -%global upstream_version 4.2.0 -#global upstream_prever RC3 +%global upstream_version 4.2.1 +%global upstream_prever RC1 Summary: Extension for communicating with the Redis key-value store Name: %{?sub_prefix}php-pecl-redis4 Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 3%{?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;')}} Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz License: PHP URL: http://pecl.php.net/package/redis -Patch0: https://github.com/phpredis/phpredis/commit/7b8b7b01a2b2af2e646ca89802910ac216c476dc.patch - BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear @@ -129,7 +127,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch0 -p1 # Use system library rm -r liblzf @@ -163,6 +160,8 @@ extension = %{pecl_name}.so ;session.save_path = "tcp://host1:6379?weight=1, tcp://host2:6379?weight=2&timeout=2.5, tcp://host3:6379?weight=2" ; Configuration +;redis.arrays.algorithm = '' +;redis.arrays.auth = '' ;redis.arrays.autorehash = 0 ;redis.arrays.connecttimeout = 0 ;redis.arrays.distributor = '' @@ -175,10 +174,14 @@ extension = %{pecl_name}.so ;redis.arrays.previous = '' ;redis.arrays.readtimeout = 0 ;redis.arrays.retryinterval = 0 +;redis.arrays.consistent = 0 +;redis.clusters.auth = 0 ;redis.clusters.persistent = 0 ;redis.clusters.read_timeout = 0 ;redis.clusters.seeds = '' ;redis.clusters.timeout = 0 +;redis.pconnect.pooling_enabled = 0 +;redis.pconnect.connection_limit = 0 ;redis.session.locking_enabled = 0 ;redis.session.lock_expire = 0 ;redis.session.lock_retries = 10 @@ -337,6 +340,9 @@ fi %changelog +* Mon Feb 25 2019 Remi Collet - 4.2.1~RC1-1 +- update to 4.2.1RC1 (alpha) + * Tue Dec 11 2018 Remi Collet - 4.2.0-3 - test build for upstream patch -- cgit