You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually, this method don't allow mark command for run in transaction with default isolation level. ->requireTransaction() don't run command in transaction.
CommandInterface do not contain requireTransaction method. Suggest remove requireTransaction and isolationLevel from implementations. For run in transcation can be used $db->transcation(). If there is a request for requireTransaction() then we can add it in next major version to CommandInterface.
This method has one advantage. If the logger or profiler is configured on the same db connection, the logger and profiler entries will be rolled back along with the failed query if use $db->transaction(fn () => $command->execute());
This method allows you to complete a transaction for a command only.
But I would not use a logger and profiler in production or need to configure them on different storage / db connection. I'm more inclined that this method is redundant, at least until today it was not used and there were no problems (in yii2 the same).
Protected
AbstractCommand::requireTransaction()
method should bepublic
or removed.If it will be public possible usage
Or if not use
requireTransaction()
The text was updated successfully, but these errors were encountered: