yiisoft / yii2-redis

Yii 2 Redis extension.
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
452 stars 183 forks source link

Feature/ssl context configuration #227

Closed akselikap closed 3 years ago

akselikap commented 3 years ago
Q A
Is bugfix? no
New feature? yes
Breaks BC? no
Tests pass? yes (sort of, I'm experiencing failures on every 2 to 3 runs. I suppose this is related to my Redis which is just a docker run command without any configuration)
Fixed issues I didn't see any related to this

At the moment it's impossible to use a Redis which uses a self-signed certificate. This PR adds a new option sslContextOptions which exposes the ssl context options (https://www.php.net/manual/en/context.ssl.php) to users. The only thing I'm not 100% sure of is whether or not the stream_context_create -function returns the default settings which would be used anyway if it's called without any parameters. I assume this is the case but someone who has more knowledge could confirm that.

akselikap commented 3 years ago

I didn't know how this should be versioned etc so I didn't really touch that part.

bizley commented 3 years ago

Could you please add changelog line as well? I don't believe we can unit test this in some straight way but if you know how please do.

akselikap commented 3 years ago

Could you please add changelog line as well? I don't believe we can unit test this in some straight way but if you know how please do.

I made the changes to CHANGELOG.md. I didn't see any tests for the useSSL-option either so I think this falls into the same category.

samdark commented 3 years ago

Thanks.