function Connection::doCommit
Do the actual commit, invoke post-commit callbacks.
@internal
Deprecated
in drupal:10.2.0 and is removed from drupal:11.0.0. Use TransactionManagerInterface methods instead.
See also
https://www.drupal.org/node/3381002
1 call to Connection::doCommit()
- Connection::popCommittableTransactions in core/
lib/ Drupal/ Core/ Database/ Connection.php  - Commit all the transaction layers that can commit.
 
File
- 
              core/
lib/ Drupal/ Core/ Database/ Connection.php, line 1703  
Class
- Connection
 - Base Database API class.
 
Namespace
Drupal\Core\DatabaseCode
protected function doCommit() {
  @trigger_error(__METHOD__ . '() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use TransactionManagerInterface methods instead. See https://www.drupal.org/node/3381002', E_USER_DEPRECATED);
  $success = $this->connection
    ->commit();
  if (!empty($this->rootTransactionEndCallbacks)) {
    $callbacks = $this->rootTransactionEndCallbacks;
    $this->rootTransactionEndCallbacks = [];
    foreach ($callbacks as $callback) {
      call_user_func($callback, $success);
    }
  }
  if (!$success) {
    throw new TransactionCommitFailedException();
  }
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.