Skip to content

Commit fd44aca

Browse files
mfettignicolas-grekas
authored andcommitted
[Cache] Fix support for predis/predis:^2.0
1 parent 3356c93 commit fd44aca

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class PredisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCas
2323
*/
2424
protected function createRedisClient(string $host): object
2525
{
26-
return new Client([array_combine(['host', 'port'], explode(':', getenv('REDIS_HOST')) + [1 => 6379])]);
26+
return new Client(
27+
[array_combine(['host', 'port'], explode(':', getenv('REDIS_HOST')) + [1 => 6379])],
28+
['cluster' => 'redis']
29+
);
2730
}
2831
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"symfony/polyfill-php80": "^1.16"
2323
},
2424
"require-dev": {
25-
"predis/predis": "~1.0",
25+
"predis/predis": "^1.0|^2.0",
2626
"symfony/cache": "^4.4|^5.0|^6.0",
2727
"symfony/dependency-injection": "^5.4|^6.0",
2828
"symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4",

0 commit comments

Comments
 (0)