-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
add sentinel support #399
base: main
Are you sure you want to change the base?
add sentinel support #399
Conversation
Codecov Report
@@ Coverage Diff @@
## main #399 +/- ##
=======================================
Coverage ? 96.24%
Complexity ? 382
=======================================
Files ? 21
Lines ? 1012
Branches ? 0
=======================================
Hits ? 974
Misses ? 38
Partials ? 0 Help us with your feedback. Take ten seconds to tell us how you rate us. |
This pull request has been automatically marked as stale because it has not had |
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.
Hi @beaumind, sorry for reviewing this late and thank you for the PR. I added some comments.
public function __construct(array $params = [], array $options = []) | ||
{ | ||
$options = empty($options) ? Config::get('sentinel.options') : $options; | ||
$params = empty($params) ? Config::get('sentinel.params') : $params; |
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.
Can we add an example of how sentinel options/params looks like, probably in the README?
use TusPhp\Config; | ||
use Predis\Client as RedisClient; | ||
|
||
class RedisSentinelStore extends AbstractCache |
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.
Looks like this could directly extend RedisStore
$options = empty($options) ? Config::get('sentinel.options') : $options; | ||
$params = empty($params) ? Config::get('sentinel.params') : $params; | ||
|
||
$this->redis = new RedisClient($params, $options); |
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.
If we only need to pass missing option in RedisClient, then we can just update RedisStore to accept second parameter instead of writing a new implementation. This should not break backwards compatibility.
public function __construct(array $options = [], array $params = [])
instead of
tus-php/src/Cache/RedisStore.php
Line 19 in 2067142
public function __construct(array $options = []) |
No description provided.