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

Commit 04b0574

Browse filesBrowse files
bug #44232 [Cache] fix connecting to local Redis sockets (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- [Cache] fix connecting to local Redis sockets | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #44215 | License | MIT | Doc PR | - Commits ------- 954db3f [Cache] fix connecting to local Redis sockets
2 parents 73d6281 + 954db3f commit 04b0574
Copy full SHA for 04b0574

File tree

Expand file treeCollapse file tree

2 files changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-1
lines changed

‎src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public function provideFailedCreateConnection(): array
9696
['redis://localhost:1234'],
9797
['redis://foo@localhost'],
9898
['redis://localhost/123'],
99+
['redis:///some/local/path'],
99100
];
100101
}
101102

‎src/Symfony/Component/Cache/Traits/RedisTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Traits/RedisTrait.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public static function createConnection($dsn, array $options = [])
151151
if (preg_match('#/(\d+)$#', $params['path'], $m)) {
152152
$params['dbindex'] = $m[1];
153153
$params['path'] = substr($params['path'], 0, -\strlen($m[0]));
154-
} else {
154+
} elseif (isset($params['host'])) {
155155
throw new InvalidArgumentException(sprintf('Invalid Redis DSN: "%s", the "dbindex" parameter must be a number.', $dsn));
156156
}
157157
}

0 commit comments

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