From bf4e9a811812bc0d7c2449d69dac6249b1d8de25 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Mon, 1 Dec 2025 17:41:59 +0100 Subject: [PATCH] Fix the creation of a redis connection with only ext-relay --- src/Symfony/Component/Cache/Traits/RedisTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index 65423b606f953..8b8b763c666ed 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -95,8 +95,8 @@ public static function createConnection(#[\SensitiveParameter] string $dsn, arra throw new InvalidArgumentException('Invalid Redis DSN: it does not start with "redis[s]:".'); } - if (!\extension_loaded('redis') && !class_exists(\Predis\Client::class)) { - throw new CacheException('Cannot find the "redis" extension nor the "predis/predis" package.'); + if (!\extension_loaded('redis') && !\extension_loaded('relay') && !class_exists(\Predis\Client::class)) { + throw new CacheException('Cannot find the "redis" extension nor the "relay" extension nor the "predis/predis" package.'); } $params = preg_replace_callback('#^'.$scheme.':(//)?(?:(?:(?[^:@]*+):)?(?[^@]*+)@)?#', function ($m) use (&$auth) {