diff --git a/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php b/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php index 8758560d3e40f..c1c9681dfacb3 100644 --- a/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php +++ b/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php @@ -87,8 +87,6 @@ public function testRelayProxy() public function testRedis6Proxy($class, $stub) { if (version_compare(phpversion('redis'), '6.0.0', '<')) { - $this->markTestIncomplete('To be re-enabled when phpredis v6 becomes stable'); - $stub = file_get_contents("https://raw.githubusercontent.com/phpredis/phpredis/develop/{$stub}.stub.php"); $stub = preg_replace('/^class /m', 'return; \0', $stub); $stub = preg_replace('/^return; class ([a-zA-Z]++)/m', 'interface \1StubInterface', $stub, 1); @@ -108,7 +106,7 @@ public function testRedis6Proxy($class, $stub) continue; } $return = $method->getReturnType() instanceof \ReflectionNamedType && 'void' === (string) $method->getReturnType() ? '' : 'return '; - $methods[] = "\n ".ProxyHelper::exportSignature($method, false, $args)."\n".<<lazyObjectState->realInstance ??= (\$this->lazyObjectState->initializer)())->{$method->name}({$args}); } diff --git a/src/Symfony/Component/Cache/Traits/Redis6Proxy.php b/src/Symfony/Component/Cache/Traits/Redis6Proxy.php index 0ede9afbf2ecd..24edb20bc37b3 100644 --- a/src/Symfony/Component/Cache/Traits/Redis6Proxy.php +++ b/src/Symfony/Component/Cache/Traits/Redis6Proxy.php @@ -181,7 +181,7 @@ public function config($operation, $key_or_settings = null, $value = null): mixe return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->config(...\func_get_args()); } - public function connect($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, $context = null): bool + public function connect($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool { return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->connect(...\func_get_args()); } @@ -686,12 +686,12 @@ public function object($subcommand, $key): \Redis|false|int|string return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->object(...\func_get_args()); } - public function open($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, $context = null): bool + public function open($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool { return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->open(...\func_get_args()); } - public function pconnect($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, $context = null): bool + public function pconnect($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool { return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pconnect(...\func_get_args()); } @@ -736,7 +736,7 @@ public function pipeline(): \Redis|bool return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pipeline(...\func_get_args()); } - public function popen($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, $context = null): bool + public function popen($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool { return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->popen(...\func_get_args()); } diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php index 52d6202b602b0..34d672f9bf8bb 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php @@ -118,7 +118,7 @@ public function testKeepGettingPendingMessages() $redis = $this->createMock(\Redis::class); $redis->expects($this->exactly(3))->method('xreadgroup') - ->with('symfony', 'consumer', ['queue' => 0], 1, null) + ->with('symfony', 'consumer', ['queue' => 0], 1, 1) ->willReturn(['queue' => [['message' => json_encode(['body' => 'Test', 'headers' => []])]]]); $connection = Connection::fromDsn('redis://localhost/queue', [], $redis); @@ -212,7 +212,7 @@ public function testGetPendingMessageFirst() $redis = $this->createMock(\Redis::class); $redis->expects($this->exactly(1))->method('xreadgroup') - ->with('symfony', 'consumer', ['queue' => '0'], 1, null) + ->with('symfony', 'consumer', ['queue' => '0'], 1, 1) ->willReturn(['queue' => [['message' => '{"body":"1","headers":[]}']]]); $connection = Connection::fromDsn('redis://localhost/queue', [], $redis); @@ -237,11 +237,11 @@ public function testClaimAbandonedMessageWithRaceCondition() ->willReturnCallback(function (...$args) { static $series = [ // first call for pending messages - [['symfony', 'consumer', ['queue' => '0'], 1, null], []], + [['symfony', 'consumer', ['queue' => '0'], 1, 1], []], // second call because of claimed message (redisid-123) - [['symfony', 'consumer', ['queue' => '0'], 1, null], []], + [['symfony', 'consumer', ['queue' => '0'], 1, 1], []], // third call because of no result (other consumer claimed message redisid-123) - [['symfony', 'consumer', ['queue' => '>'], 1, null], []], + [['symfony', 'consumer', ['queue' => '>'], 1, 1], []], ]; [$expectedArgs, $return] = array_shift($series); @@ -273,9 +273,9 @@ public function testClaimAbandonedMessage() ->willReturnCallback(function (...$args) { static $series = [ // first call for pending messages - [['symfony', 'consumer', ['queue' => '0'], 1, null], []], + [['symfony', 'consumer', ['queue' => '0'], 1, 1], []], // second call because of claimed message (redisid-123) - [['symfony', 'consumer', ['queue' => '0'], 1, null], ['queue' => [['message' => '{"body":"1","headers":[]}']]]], + [['symfony', 'consumer', ['queue' => '0'], 1, 1], ['queue' => [['message' => '{"body":"1","headers":[]}']]]], ]; [$expectedArgs, $return] = array_shift($series); diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php index 0704a9831a26a..e665293529433 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php @@ -353,6 +353,7 @@ public function get(): ?array $this->group, $this->consumer, [$this->stream => $messageId], + 1, 1 ); } catch (\RedisException|\Relay\Exception $e) { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy