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

[Cache] added DSN support for rediss in AbstractAdapter and RedisTrait #30605

Merged
merged 1 commit into from
Mar 20, 2019
Merged

[Cache] added DSN support for rediss in AbstractAdapter and RedisTrait #30605

merged 1 commit into from
Mar 20, 2019

Conversation

alex-vasilchenko-md
Copy link
Contributor

@alex-vasilchenko-md alex-vasilchenko-md commented Mar 19, 2019

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.

Copy link
Member

@stof stof left a 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:')) {
Copy link
Member

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

Copy link
Contributor Author

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.

@nicolas-grekas nicolas-grekas added this to the next milestone Mar 19, 2019
@fabpot
Copy link
Member

fabpot commented Mar 20, 2019

Thank you @alex-vasilchenko-md.

@fabpot fabpot merged commit 7e2852d into symfony:master Mar 20, 2019
fabpot added a commit that referenced this pull request Mar 20, 2019
…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
@stof
Copy link
Member

stof commented Mar 20, 2019

AFAICT, this will still treat it the same than redis when passing the settings to the Redis connection. There is no change making it use an encrypted connection. So this looks incomplete.

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
@fabpot fabpot mentioned this pull request May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants