function Connection::commitAll

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

Commits all the open transactions.

@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/Connection.php, line 226

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public function commitAll() {
    $manager = $this->transactionManager();
    if ($manager->inTransaction() && method_exists($manager, 'commitAll')) {
        $this->transactionManager()
            ->commitAll();
    }
}

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