Skip to content

Commit 76df329

Browse files
committed
bug symfony#58169 [Cache] Fix compatibility with Redis 6.1.0 pre-releases (cedric-anne)
This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [Cache] Fix compatibility with Redis 6.1.0 pre-releases | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix symfony#57884 | License | MIT The solution provided in symfony#57885 will fix the compatibility with the PHPRedis 6.1.0 release, but the issue persists on the pre-releases (for instance the [6.1.0RC1](https://pecl.php.net/package/redis/6.1.0RC1) version). I propose to use the new signatures for any 6.1.0 version, including its pre-releases. ```php version_compare('6.1.0RC1', '6.1.0', '>='); // false version_compare('6.1.0RC1', '6.1.0-dev', '>='); // true ``` Commits ------- 9569a5f [Cache] Fix compatibility with Redis 6.1.0 pre-releases
2 parents 5230523 + 9569a5f commit 76df329

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\Cache\Traits;
1313

14-
if (version_compare(phpversion('redis'), '6.1.0', '>=')) {
14+
if (version_compare(phpversion('redis'), '6.1.0-dev', '>=')) {
1515
/**
1616
* @internal
1717
*/
@@ -27,7 +27,7 @@ public function hRandField($key, $options = null): \Redis|array|string|false
2727
return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hRandField(...\func_get_args());
2828
}
2929

30-
public function hSet($key, $fields_and_vals): \Redis|false|int
30+
public function hSet($key, ...$fields_and_vals): \Redis|false|int
3131
{
3232
return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hSet(...\func_get_args());
3333
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\Cache\Traits;
1313

14-
if (version_compare(phpversion('redis'), '6.1.0', '>')) {
14+
if (version_compare(phpversion('redis'), '6.1.0-dev', '>')) {
1515
/**
1616
* @internal
1717
*/

0 commit comments

Comments
 (0)