Skip to content

Conversation

@nicolas-grekas
Copy link
Member

Q A
Branch? 4.4
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

@nicolas-grekas nicolas-grekas merged commit 99b4885 into symfony:4.4 Jan 17, 2022
@nicolas-grekas nicolas-grekas deleted the cache-redis-array branch January 17, 2022 16:17
@alebedev80
Copy link
Contributor

alebedev80 commented Feb 1, 2022

@nicolas-grekas why it was merged to 5.4 branch?

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

Please rollback it

@nicolas-grekas
Copy link
Member Author

Please open an issue or better: a PR. Note that a simple rollback is certainly not the solution since this PR fixes a deprecation (argument is not nullable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants