public Connection::commit()
Throws an exception to deny direct access to transaction commits.
We do not want to allow users to commit transactions at any time, only by destroying the transaction object or allowing it to go out of scope. A direct commit bypasses all of the safety checks we've built on top of PDO's transaction routines.
\Drupal\Core\Database\TransactionExplicitCommitNotAllowedException
\Drupal\Core\Database\Transaction
public function commit() { throw new TransactionExplicitCommitNotAllowedException(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Connection.php/function/Connection::commit/8.1.x