function TransactionManagerBase::commitAll

Same name in other branches
  1. 10 core/lib/Drupal/Core/Database/Transaction/TransactionManagerBase.php \Drupal\Core\Database\Transaction\TransactionManagerBase::commitAll()

Commits the entire transaction stack.

@internal This method exists only to work around a bug caused by Drupal incorrectly relying on object destruction order to commit transactions. Xdebug 3.3.0 changes the order of object destruction when the develop mode is enabled.

File

core/lib/Drupal/Core/Database/Transaction/TransactionManagerBase.php, line 158

Class

TransactionManagerBase
The database transaction manager base class.

Namespace

Drupal\Core\Database\Transaction

Code

public function commitAll() : void {
    foreach (array_reverse($this->stack()) as $id => $item) {
        $this->unpile($item->name, $id);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.