Skip to content

Commit 5fe2934

Browse files
committed
sync the Redis6Proxy class with latest upstream changes
see phpredis/phpredis#2162, phpredis/phpredis#2163, and phpredis/phpredis#2166
1 parent 79d47d6 commit 5fe2934

2 files changed

Lines changed: 28 additions & 2 deletions

File tree

src/Symfony/Component/Cache/Tests/RedisProxiesTest.php renamed to src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class RedisProxiesTest extends TestCase
2626
*/
2727
public function testRedis5Proxy($class)
2828
{
29-
$proxy = file_get_contents(\dirname(__DIR__)."/Traits/{$class}5Proxy.php");
29+
$proxy = file_get_contents(\dirname(__DIR__, 2)."/Traits/{$class}5Proxy.php");
3030
$proxy = substr($proxy, 0, 8 + strpos($proxy, "\n ];"));
3131
$methods = [];
3232

src/Symfony/Component/Cache/Traits/Redis6Proxy.php

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function command($opt, $arg): mixed
162162
return $this->lazyObjectReal->command(...\func_get_args());
163163
}
164164

165-
public function config($operation, $key, $value = null): mixed
165+
public function config($operation, $key = null, $value = null): mixed
166166
{
167167
return $this->lazyObjectReal->config(...\func_get_args());
168168
}
@@ -257,6 +257,17 @@ public function failover($to = null, $abort = false, $timeout = 0): bool
257257
return $this->lazyObjectReal->failover(...\func_get_args());
258258
}
259259

260+
public function expiretime($key): \Redis|false|int
261+
{
262+
return $this->lazyObjectReal->expiretime(...\func_get_args());
263+
}
264+
265+
public function pexpiretime($key): \Redis|false|int
266+
{
267+
return $this->lazyObjectReal->pexpiretime(...\func_get_args());
268+
}
269+
270+
260271
public function flushAll($sync = null): bool
261272
{
262273
return $this->lazyObjectReal->flushAll(...\func_get_args());
@@ -382,6 +393,11 @@ public function getRange($key, $start, $end)
382393
return $this->lazyObjectReal->getRange(...\func_get_args());
383394
}
384395

396+
public function lcs($key1, $key2, $options = null): \Redis|array|false|int|string
397+
{
398+
return $this->lazyObjectReal->lcs(...\func_get_args());
399+
}
400+
385401
public function getReadTimeout(): int
386402
{
387403
return $this->lazyObjectReal->getReadTimeout(...\func_get_args());
@@ -767,6 +783,11 @@ public function sInter($key, ...$other_keys): array
767783
return $this->lazyObjectReal->sInter(...\func_get_args());
768784
}
769785

786+
public function sintercard($keys, $limit = -1): \Redis|false|int
787+
{
788+
return $this->lazyObjectReal->sintercard(...\func_get_args());
789+
}
790+
770791
public function sInterStore($dst, $key, ...$other_keys): int
771792
{
772793
return $this->lazyObjectReal->sInterStore(...\func_get_args());
@@ -1162,6 +1183,11 @@ public function zinter($keys, $weights = null, $options = null): array
11621183
return $this->lazyObjectReal->zinter(...\func_get_args());
11631184
}
11641185

1186+
public function zintercard(array $keys, int $limit = -1): \Redis|false|int
1187+
{
1188+
return $this->lazyObjectReal->zintercard(...\func_get_args());
1189+
}
1190+
11651191
public function zinterstore($dst, $keys, $weights = null, $aggregate = null): int
11661192
{
11671193
return $this->lazyObjectReal->zinterstore(...\func_get_args());

0 commit comments

Comments
 (0)