Skip to content

Commit 3678f5c

Browse files
bug #62602 [Cache] Fix the creation of a redis connection with only ext-relay (stof)
This PR was merged into the 6.4 branch. Discussion ---------- [Cache] Fix the creation of a redis connection with only ext-relay | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no <!-- if yes, also update src/**/CHANGELOG.md --> | Deprecations? | no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md --> | Issues | Fix #62601 | License | MIT Commits ------- bf4e9a8 Fix the creation of a redis connection with only ext-relay
2 parents bc425ed + bf4e9a8 commit 3678f5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ public static function createConnection(#[\SensitiveParameter] string $dsn, arra
9595
throw new InvalidArgumentException('Invalid Redis DSN: it does not start with "redis[s]:".');
9696
}
9797

98-
if (!\extension_loaded('redis') && !class_exists(\Predis\Client::class)) {
99-
throw new CacheException('Cannot find the "redis" extension nor the "predis/predis" package.');
98+
if (!\extension_loaded('redis') && !\extension_loaded('relay') && !class_exists(\Predis\Client::class)) {
99+
throw new CacheException('Cannot find the "redis" extension nor the "relay" extension nor the "predis/predis" package.');
100100
}
101101

102102
$params = preg_replace_callback('#^'.$scheme.':(//)?(?:(?:(?<user>[^:@]*+):)?(?<password>[^@]*+)@)?#', function ($m) use (&$auth) {

0 commit comments

Comments
 (0)