@@ -97,7 +97,8 @@ public function resolve($name = null)
97
97
98
98
if (isset ($ this ->config [$ name ])) {
99
99
return $ this ->connector ()->connect (
100
- $ this ->parseConnectionConfigWithUrl ($ this ->config [$ name ]), $ options
100
+ $ this ->parseConnectionConfiguration ($ this ->config [$ name ]),
101
+ $ options
101
102
);
102
103
}
103
104
@@ -117,7 +118,7 @@ public function resolve($name = null)
117
118
protected function resolveCluster ($ name )
118
119
{
119
120
return $ this ->connector ()->connectToCluster (
120
- $ this ->parseConnectionConfigWithUrl ($ this ->config ['clusters ' ][$ name ]),
121
+ $ this ->parseConnectionConfiguration ($ this ->config ['clusters ' ][$ name ]),
121
122
$ this ->config ['clusters ' ]['options ' ] ?? [],
122
123
$ this ->config ['options ' ] ?? []
123
124
);
@@ -157,16 +158,16 @@ protected function connector()
157
158
}
158
159
159
160
/**
160
- * Parse the redis configuration, hydrating options using a redis configuration URL if possible .
161
+ * Parse the Redis connection configuration.
161
162
*
162
- * @param array $config
163
+ * @param mixed $config
163
164
* @return array
164
165
*/
165
- protected function parseConnectionConfigWithUrl ($ config )
166
+ protected function parseConnectionConfiguration ($ config )
166
167
{
167
- $ parsedConfig = (new ConfigurationUrlParser )->parseConfiguration ($ config );
168
+ $ parsed = (new ConfigurationUrlParser )->parseConfiguration ($ config );
168
169
169
- return array_filter ($ parsedConfig , function ($ key ) {
170
+ return array_filter ($ parsed , function ($ key ) {
170
171
return ! in_array ($ key , ['driver ' , 'username ' ]);
171
172
}, ARRAY_FILTER_USE_KEY );
172
173
}
0 commit comments