By mondrake on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
11.5.x
Introduced in version:
11.5.0
Issue links:
Description:
Drupal by default was committing a database transaction when its Transaction object goes out of scope, during the Transaction object destruction.
The new Transaction::commitOrRelease() method is now being used all across Drupal's core codebase to explicitly perform a commit/savepoint release operation on a database transaction.
Besides:
- The implicit commit on Transaction destruction behaviour is deprecated, and its implementation will be removed in Drupal 13.
- The methods introduced in #3405976: Transaction autocommit during shutdown relies on unreliable object destruction order (xdebug 3.3+ enabled) are deprecated for removal in Drupal 13, without replacement:
Connection::commitAll()Database::commitAllOnShutdown()TransactionManagerBase::commitAll()
- The following methods in
Drupal\pgsql\Driver\Database\pgsql\Connectionare deprecated for removal in Drupal 13:::addSavepoint()replaced byConnection::startTransaction()::releaseSavepoint()replaced byTransaction::commitOrRelease()::rollbackSavepoint()replaced byTransaction::rollback()
Read Transaction::commitOrRelease() method introduced to explicit commit a transaction for before/after examples.
Impacts:
Module developers