-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove support for transaction nesting without savepoints #5401
Conversation
b7d772a
to
c6fd2d5
Compare
@@ -1045,39 +1039,37 @@ public function transactional(Closure $func): mixed | |||
/** | |||
* Sets if nested transactions should use savepoints. | |||
* | |||
* @deprecated No replacement planned | |||
* | |||
* @throws Exception | |||
*/ | |||
public function setNestTransactionsWithSavepoints(bool $nestTransactionsWithSavepoints): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we keep the method, we should throw if false
is passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why deprecate it in the next major given that the dummy mode is already deprecated and is being removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #5383, I tell people they should not call setNestTransactionsWithSavepoints(true)
since false
is the default for backward compatibility. If they do so, it means they will have one more action to perform right after upgrading to v4 before they have a working application. I'll leave you the judge of whether this is fine or not, I don't know if we should have some kind of rule about this. My concern is that if the list of such changes gets too big, the upgrade could become painful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so there are two breaking changes necessary:
- Change the default mode from
false
totrue
in 4.0 (we're letting users opt in to thetrue
mode in 3.x). - Remove the API for changing the mode in 5.0 (it will exist in 4.0 only as a stub for backward compatibility with 3.x).
Makes sense.
78642ed
to
81f04b3
Compare
81f04b3
to
818b75c
Compare
No description provided.