Skip to content

Redis Cache Adapter always uses tcp scheme even if unix socket connection string used #22974

@kopeckyales

Description

@kopeckyales
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.3.0

https://github.com/symfony/symfony/blob/3.3/src/Symfony/Component/Cache/Traits/RedisTrait.php

line 123

$params['scheme'] = isset($params['host']) ? 'tcp' : 'unix';

line 93

$params += array(
            'host' => isset($params['host']) ? $params['host'] : $params['path'],

so $params['host'] is never empty => scheme is always tcp even if path is unix socket, which leads to exception in Predis Client.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions