Conversation
|
If it works, this is awesome. I didn't find a solution to stay on the dsn variable... |
Yes indeed. So we basically reuse the default redis provider variables documented here as well https://symfony.com/doc/current/cache.html#configuring-cache-with-frameworkbundle |
|
And yes this should work again for both TCP DNS and socket DNS. Since the see: mbin/config/packages/cache.yaml Line 12 in 037b9b2 Symfony’s framework config then uses that provider here: 'provider' => 'cache.default_redis_provider',Please approve. |
Summary
Reuse Symfony's existing DSN-backed Redis provider for session storage instead of creating a second connection from mandatory
REDIS_HOSTandREDIS_PORTvariables.This restores support for all existing
REDIS_DNSconnection forms, including Unix sockets, while keeping TCP, authentication, and Docker configurations on the same canonical setting.Additional information
PR #2127 added Redis-backed session storage but created a separate
Redisservice that requiresREDIS_HOSTandREDIS_PORT. That made previously valid Unix-socket configurations fail during environment-variable resolution, even thoughREDIS_DNSremained configured as Symfony's default Redis provider.RedisSessionHandlernow receivescache.default_redis_provider, which Symfony builds through its Redis DSN connection factory. The redundant host and port variables are removed from the environment templates.Related issues
Follow-up to #2127.