Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Invalid Redis socket DSN, the "dbindex" parameter must be a number. #44215

Copy link
Copy link
Closed
@mathielen

Description

@mathielen
Issue body actions

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

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.