Skip to content

Commit 0f43b5c

Browse files
committed
feat(db): set Doctrine to use nest transactions with savepoints
Using nested transactions without savepoints is actually deprecated by Doctrine: https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/transactions.html#transaction-nesting Without savepoints, a nested transaction can be rollbacked but not handled properly in the "real" transaction, leading to the following error: Transaction commit failed because the transaction has been marked for rollback only. Ref #36528 (comment) (and possibly) #38902 (comment) Signed-off-by: Thomas Citharel <[email protected]>
1 parent 582e655 commit 0f43b5c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/private/DB/Connection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ public function __construct(
115115
$this->dbDataCollector->setDebugStack($debugStack);
116116
$this->_config->setSQLLogger($debugStack);
117117
}
118+
119+
$this->setNestTransactionsWithSavepoints(true);
118120
}
119121

120122
/**

0 commit comments

Comments
 (0)