Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kopeckyales opened this issue May 30, 2017 · 1 comment

Comments

@kopeckyales
Copy link

kopeckyales commented May 30, 2017

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.

@nicolas-grekas
Copy link
Member

@kopeckyales would you like to submit a PR to fix this? I guess the bug also exists in 3.2 where it should be fixed?

nicolas-grekas added a commit that referenced this issue Jun 3, 2017
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] fix Redis scheme detection

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22974
| License       | MIT
| Doc PR        |

Commits
-------

61685c7 [Cache] fix Redis scheme detection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants