Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for the default connection #6331

Open
wants to merge 3 commits into
base: 3.9.x
Choose a base branch
from
Open

Conversation

plantas
Copy link

@plantas plantas commented Mar 11, 2024

Q A
Type feature

Summary

This PR adds new option for PrimaryReadOnlyReplicaConnection. Currently it is hardcoded to replica as default value (https://github.com/doctrine/dbal/blob/4.0.x/src/Connections/PrimaryReadReplicaConnection.php#L147). With the new option added it can be easily configured to use primary or replica database.

In case we have asynchronous replication, the replica might not be always up to date with the primary DB. This will enable us to explicitly use particular database.

@plantas
Copy link
Author

plantas commented Mar 28, 2024

@derrabus does this feature make sense? Is there anything else I can do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant