-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Make PrimaryReadReplicaConnection enforcement explicit #9239
Conversation
Just realized the primary also needs to be enforced when select statements are made with lock levels. This was a flaw previously too |
Actually, |
@beberlei should be done in 2.10.x IMO |
9fb5e61
to
de28ed2
Compare
de28ed2
to
fe2881c
Compare
* 2.11.x: Enable UnusedUse sniff again (doctrine#9267) Whitelist composer plugins used by this repository (doctrine#9286) Fix XML export for `change-tracking-policy` (doctrine#9285) Allow symfony/cache 6 (doctrine#9283) Put actual value instead of index inside $originalEntityData. (doctrine#9244) Fix return types of cache interfaces (doctrine#9271) Better explain limitations of DQL "DELETE" (doctrine#9281) Fix docblocks on nullable EM properties (doctrine#9273) Docs: use canonical order for phpdoc tags, add missed semicolon (doctrine#9190) Make PrimaryReadReplicaConnection enforcement explicit (doctrine#9239) Regenerate Psalm baseline (doctrine#9272) Improve compatibility with Doctrine DBAL 4 (doctrine#9266) [docs] Fix wording for attributes=>parameters. (doctrine#9265) Support for nesting attributes with PHP 8.1 (doctrine#9241) Revert "Fix SchemaValidator with abstract child class in discriminator map (doctrine#9096)" (doctrine#9262) Docs: consistency for FQCN, spacing, etc (doctrine#9232)
Due a breaking API change with assumptions of
PrimaryReadReplicaConnection
in DBAL 3 without the distinction ofquery
andexecuteStatement
it is required to address the use of primary replica connection more explicitly in ORM.This isn't the most pretty solution, but it detects the use of primary replica connection at the right points: 1. id generation 2. commit 3. DQL update/delete statements.