-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Conversation
Including password support.
@@ -216,6 +219,7 @@ protected function normalizeServer(&$server) | |||
'port' => $port, | |||
'timeout' => $timeout, | |||
); | |||
return $password; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the password being returned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is returned because normalizeServer doesn't have access to the resource id / array to store the password. It is not an optimum solution but doing it a different way requires more code to be moved around as both the way the class manages the config internally and its methods don't take into account the fact the password could actually come from the URI of the server and not from a separate config entry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@franckstauffer I'm working on it right now. I'll see if I can move it somewhere else, as I don't like this return value.
…orage\Adapter\RedisResourceManager#setServer` and `#setResource`
…etServer` and `#setResource` implementation
@franckstauffer manually merged, thanks! |
… features of `Zend\Cache\Storage\Adapter\RedisResourceManager#setServer` and `#setResource`
…pter\RedisResourceManager#setServer` and `#setResource` implementation
…i-parsing' into develop Forward port zendframework/zendframework#6495
Including password support.
Some PaaS give you full-blown URIs to configure Redis (and other servers) - up until now the URIs were not parsed due to a bad condition in normalizeServer and there was no support for URIs containing a password anyway. This should fix both.