Closed
Description
Symfony version(s) affected
4.4.34
Description
When the Cache component is configured with a Redis DSN pointing to a socket (eg. redis:///var/run/redis/redis-server.sock
), an error is thrown: Invalid Redis DSN: "redis:///var/run/redis/redis-server.sock", the "dbindex" parameter must be a number.
This is probably due to #43359 with fix #44043 and an incorrect preg_match
in L151.
How to reproduce
<?php
// config/packages/cache.php
use Symfony\Config\FrameworkConfig;
return static function (FrameworkConfig $framework) {
$cache = $framework->cache();
$cache->app('cache.adapter.redis')
->defaultRedisProvider('redis:///var/run/redis/redis-server.sock');
$cache->pool('my_pool.cache')->adapters(['cache.app']);
};
Possible Solution
Skip the preg_match
check if $params['host']
is not set?
Additional Context
No response
Metadata
Metadata
Assignees
Labels
Issues and PRs which are looking for volunteers to complete them.Issues and PRs which are looking for volunteers to complete them.