From 9569a5fa3b727704a295aa568ee20c57f23e8ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Wed, 4 Sep 2024 08:34:47 +0200 Subject: [PATCH] [Cache] Fix compatibility with Redis 6.1.0 pre-releases --- src/Symfony/Component/Cache/Traits/Redis6ProxyTrait.php | 4 ++-- .../Component/Cache/Traits/RedisCluster6ProxyTrait.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Cache/Traits/Redis6ProxyTrait.php b/src/Symfony/Component/Cache/Traits/Redis6ProxyTrait.php index d339e560c7cd3..34f60cb1020fe 100644 --- a/src/Symfony/Component/Cache/Traits/Redis6ProxyTrait.php +++ b/src/Symfony/Component/Cache/Traits/Redis6ProxyTrait.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Cache\Traits; -if (version_compare(phpversion('redis'), '6.1.0', '>=')) { +if (version_compare(phpversion('redis'), '6.1.0-dev', '>=')) { /** * @internal */ @@ -27,7 +27,7 @@ public function hRandField($key, $options = null): \Redis|array|string|false return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hRandField(...\func_get_args()); } - public function hSet($key, $fields_and_vals): \Redis|false|int + public function hSet($key, ...$fields_and_vals): \Redis|false|int { return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hSet(...\func_get_args()); } diff --git a/src/Symfony/Component/Cache/Traits/RedisCluster6ProxyTrait.php b/src/Symfony/Component/Cache/Traits/RedisCluster6ProxyTrait.php index 7addffb97c454..9c3169e3239e7 100644 --- a/src/Symfony/Component/Cache/Traits/RedisCluster6ProxyTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisCluster6ProxyTrait.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Cache\Traits; -if (version_compare(phpversion('redis'), '6.1.0', '>')) { +if (version_compare(phpversion('redis'), '6.1.0-dev', '>')) { /** * @internal */