In the commit was done follow changes in Traits/RedisTrait.php(188)
Old code:
$port = $hosts[0]['port'] ?? null;
New code:
$port = $hosts[0]['port'] ?? 6379;
With DSN "redis:///var/run/redis/redis.sock" raise an error:
Redis connection "redis:///var/run/redis/redis.sock?dbindex=5" failed: php_network_getaddresses: getaddrinfo failed: Name or service not known
Because phpredis doesn't allow socket connections with a port
(new Redis)->connect('/var/run/redis/redis.sock', 6379);
Error
PHP Warning: Redis::connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /root/test_redis.php on line 5
PHP Fatal error: Uncaught RedisException: php_network_getaddresses: getaddrinfo failed: Name or service not known in /root/test_redis.php:5
Stack trace:
#0 /root/test_redis.php(5): Redis->connect()
#1 {main}
thrown in /root/test_redis.php on line 5
I added additional validation of connection type (by host or socket). I fixed condition when RedisSentinel connection call as it support connections by host only.