SncRedis config does not support env variables of "json" type, at least for dsn property.
Example .env
REDIS_SENTINELS="[\"redis://redis-sentinel1.dev:26379\", \"redis://redis-sentinel2.dev:26379\", \"redis://redis-sentinel3.dev:26379\"]"
Example config
snc_redis:
clients:
default:
type: predis
alias: default
dsn: '%env(json:REDIS_SENTINELS)%'
PHP warnings
PHP Warning: strrpos() expects parameter 1 to be string, array given in /home/app/src/vendor/snc/redis-bundle/DependencyInjection/Configuration/RedisDsn.php on line 172
PHP Warning: preg_match() expects parameter 2 to be string, array given in /home/app/src/vendor/snc/redis-bundle/DependencyInjection/Configuration/RedisDsn.php on line 185
PHP Warning: preg_match() expects parameter 2 to be string, array given in /home/app/src/vendor/snc/redis-bundle/DependencyInjection/Configuration/RedisDsn.php on line 190
PHP Warning: preg_match() expects parameter 2 to be string, array given in /home/app/src/vendor/snc/redis-bundle/DependencyInjection/Configuration/RedisDsn.php on line 203
PHP Warning: strpos() expects parameter 1 to be string, array given in /home/app/src/vendor/snc/redis-bundle/DependencyInjection/Configuration/RedisDsn.php on line 212
JSON support would simplify SncRedis config as sentinel dsn count may differ in different enviroments.
SncRedis config does not support env variables of "json" type, at least for
dsnproperty.Example .env
Example config
PHP warnings
JSON support would simplify SncRedis config as sentinel dsn count may differ in different enviroments.