-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Cache] added DSN support for rediss in AbstractAdapter and RedisTrait #30605
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
Conversation
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.
Tests must be added for createConnection
to cover the rediss
scheme.
@@ -80,8 +80,8 @@ private function init($redisClient, $namespace, $defaultLifetime, ?MarshallerInt | |||
*/ | |||
public static function createConnection($dsn, array $options = []) | |||
{ | |||
if (0 !== strpos($dsn, 'redis:')) { | |||
throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s does not start with "redis:".', $dsn)); | |||
if (0 !== strpos($dsn, 'redis:') && 0 !== strpos($dsn, 'rediss:')) { |
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.
you also need to update the regex of the preg_replace_callback
below
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.
OK, @stof , I added tests and modified regexp.
Thank you @alex-vasilchenko-md. |
…r and RedisTrait (alex-vasilchenko-md) This PR was squashed before being merged into the 4.3-dev branch (closes #30605). Discussion ---------- [Cache] added DSN support for rediss in AbstractAdapter and RedisTrait | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #30573 | License | MIT A fix for this issue: #30573 Support for "rediss:" in DSN added. Commits ------- 7e2852d [Cache] added DSN support for rediss in AbstractAdapter and RedisTrait
AFAICT, this will still treat it the same than |
A fix for this issue: #30573
Support for "rediss:" in DSN added.