Skip to content

Commit 6202536

Browse files
Code cleanup
1 parent 7bb5068 commit 6202536

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

docs/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ snc_redis:
121121
parameters:
122122
database: 1
123123
password: pass
124-
sentinel_auth: pass1
125-
disable_sentinel_auth: false # default to false
124+
sentinel_auth: pass1 # default to null
126125
127126
```
128127

@@ -134,8 +133,7 @@ If you use a password, it must be in the password parameter and must
134133
be omitted from the DSNs. Also make sure to use the sentinel port number
135134
(26379 by default) in the DSNs, and not the default Redis port.
136135
You can find more information about this on [Configuring Sentinel](https://redis.io/topics/sentinel#configuring-sentinel).
137-
`sentinel_auth` is used to set a specific password for Sentinel authentication. If you do not provide a `sentinel_auth` password, the default `password` will be used for Sentinel authentication. you can disable sentinel auth `disable_sentinel_auth` if you don't require
138-
136+
`sentinel_auth` is used to set a specific password for Sentinel authentication. default is null (No authentication)
139137
A setup using `RedisCluster` from `phpredis` could look like this:
140138

141139
``` yaml

src/DependencyInjection/Configuration/Configuration.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ private function addClientsSection(ArrayNodeDefinition $rootNode): void
156156
->scalarNode('username')->defaultNull()->end()
157157
->scalarNode('password')->defaultNull()->end()
158158
->scalarNode('sentinel_auth')->defaultNull()->end()
159-
->booleanNode('disable_sentinel_auth')->defaultValue(false)->end()
160159
->booleanNode('logging')->defaultValue($this->debug)->end()
161160
->variableNode('ssl_context')->defaultNull()->end()
162161
->end()

src/Factory/PhpredisClientFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private function createClientFromSentinel(string $class, array $dsns, string $al
134134
'persistent' => $connectionPersistent,
135135
'retryInterval' => 5,
136136
'readTimeout' => $readTimeout,
137-
'auth' => $options['parameters']['disable_sentinel_auth'] ? null : ($options['parameters']['sentinel_auth'] ?? $dsn->getPassword() ?? null)
137+
'auth' => $options['parameters']['sentinel_auth'] ?? null,
138138
];
139139
try {
140140
if ($isRelay || version_compare(phpversion('redis'), '6.0', '<')) {

0 commit comments

Comments
 (0)