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

Conversation

Projects
None yet
5 participants
@alex-vasilchenko-md
Copy link
Contributor

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.

@stof
Copy link
Member

left a comment

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:')) {

This comment has been minimized.

Copy link
@stof

stof Mar 19, 2019

Member

you also need to update the regex of the preg_replace_callback below

This comment has been minimized.

Copy link
@alex-vasilchenko-md

alex-vasilchenko-md Mar 20, 2019

Author Contributor

OK, @stof , I added tests and modified regexp.

@nicolas-grekas nicolas-grekas added this to the next milestone Mar 19, 2019

@nicolas-grekas nicolas-grekas added Feature and removed Bug labels Mar 19, 2019

@fabpot

fabpot approved these changes Mar 20, 2019

@fabpot

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

Thank you @alex-vasilchenko-md.

@fabpot fabpot merged commit 7e2852d into symfony:master Mar 20, 2019

1 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Mar 20, 2019

feature #30605 [Cache] added DSN support for rediss in AbstractAdapte…
…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

This comment has been minimized.

Copy link
Member

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 referenced this pull request May 9, 2019

Merged

Release v4.3.0-BETA1 #31435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.