Repository navigation
Fix BC break with env DSN & explicit aggregate - #765
Merged
ostrolucky merged 2 commits intoAug 2, 2026
Merged
Conversation
Factor out the repeated single-env-DSN check into one named local and add comments distinguishing the pre-normalization ($userDefinedAggregate) and post-normalization ($isAggregate) reads of the cluster/replication options so the two identical-looking expressions aren't mistaken for redundant duplication. No behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RBgT2MSur2tf8nxCzkCFni
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #759, a client configured with a single
%env()%DSN and an explicit aggregate mode (replication: sentinel,replication: predis, orcluster) no longer works correctly. The aggregate option is silently ignored, and Predis connects to the configured host as if it were a standalone Redis server.This is a significant BC break. In my case, this affects a Kubernetes deployment where the DSN points to a single Sentinel Service that load-balances traffic across the Sentinel pods:
There is only one address in the DSN, so after #759, Sentinel mode is no longer applied and the client attempts to communicate with the Sentinel endpoint as if it were a regular Redis server.
This PR ensures that an explicitly configured
replicationorclustermode is always honored, regardless of whether the environment DSN expands to one or multiple addresses.The behavior introduced in #759, which allows an environment DSN to expand to multiple connections, remains unchanged.