Skip to content

Commit 28fe177

Browse files
bug #48680 [Cache] fix lazyness of redis when using RedisTagAwareAdapter (nicolas-grekas)
This PR was merged into the 6.2 branch. Discussion ---------- [Cache] fix lazyness of redis when using RedisTagAwareAdapter | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #48677 | License | MIT | Doc PR | - Commits ------- 9d510a7 [Cache] fix lazyness of redis when using RedisTagAwareAdapter
2 parents 6a3d23b + 9d510a7 commit 28fe177

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInter
6565
throw new InvalidArgumentException(sprintf('Unsupported Predis cluster connection: only "%s" is, "%s" given.', PredisCluster::class, get_debug_type($redis->getConnection())));
6666
}
6767

68-
if (\defined('Redis::OPT_COMPRESSION') && ($redis instanceof \Redis || $redis instanceof \RedisArray || $redis instanceof \RedisCluster)) {
68+
if (\defined('Redis::OPT_COMPRESSION') && \in_array($redis::class, [\Redis::class, \RedisArray::class, \RedisCluster::class], true)) {
6969
$compression = $redis->getOption(\Redis::OPT_COMPRESSION);
7070

7171
foreach (\is_array($compression) ? $compression : [$compression] as $c) {

0 commit comments

Comments
 (0)