Skip to content

[Cache] Document Redis auth option and DSN username/auth parameters#21996

Open
ckrack wants to merge 3 commits intosymfony:6.4from
ckrack:cache-dsn-params
Open

[Cache] Document Redis auth option and DSN username/auth parameters#21996
ckrack wants to merge 3 commits intosymfony:6.4from
ckrack:cache-dsn-params

Conversation

@ckrack
Copy link
Contributor

@ckrack ckrack commented Feb 12, 2026

This PR documents the previously undocumented auth connection option for the Redis cache adapter and improves the DSN authentication examples.

Changes:

  • Mention username support in the DSN description text
  • Update DSN example to use a custom username instead of default
  • Add example for auth[] query parameter syntax
  • Document the auth option in the options array and the "Available Options" section
  • Add note that Predis ignores the auth option (credentials must be provided via DSN)

Context:

This was requested in the discussion on symfony/symfony#63324, where it was pointed out that the auth parameter was undocumented.

@nicolas-grekas
Copy link
Member

Cool thanks.
Ppl are also looking for differentiating sentinel vs master auth, see symfony/symfony#62218
Let's hint about this use case!

The DSN can specify either an IP/host (and an optional port) or a socket path, as well as a
password and a database index. To enable TLS for connections, the scheme ``redis`` must be
replaced by ``rediss`` (the second ``s`` means "secure").
username, password and a database index. To enable TLS for connections, the scheme ``redis``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot add a suggestion on a line which is not updated, but I think we could use an before username

@nicolas-grekas
Copy link
Member

Let's account for symfony/symfony#63391 here also, and likely update the messenger doc too. 🙏

@ckrack
Copy link
Contributor Author

ckrack commented Feb 14, 2026

Let's account for symfony/symfony#63391 here also, and likely update the messenger doc too. 🙏

Should i target 7.4 then?

@nicolas-grekas
Copy link
Member

Ah right, yes, 7.4 is good enough

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.

5 participants