Skip to content

Comments

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

Open
ckrack wants to merge 4 commits intosymfony:7.4from
ckrack:cache-dsn-params
Open

[Cache] Document Redis auth option and DSN username/auth parameters#21996
ckrack wants to merge 4 commits intosymfony:7.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``

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, a/an is chosen by the sound of the following word. y-sounds like username, university etc use the consonant version. So the "a" should be correct.

Copy link
Contributor

Choose a reason for hiding this comment

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

My bad

@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

@ckrack ckrack requested a review from xabbuh as a code owner February 17, 2026 21:10
@ckrack
Copy link
Contributor Author

ckrack commented Feb 17, 2026

@nicolas-grekas rebased onto 7.4 and added examples and notes to both component docs.

Sorry for the codeowner ping @xabbuh, that's due to a rebase on 7.4

@ckrack ckrack changed the base branch from 6.4 to 7.4 February 17, 2026 21:13
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