X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Fdatabase%2FDatabase.php;h=d1230e00f18befd7bd626761d858ac5e9bdab2e7;hp=1517bd931c46b97e68f363b36085f3445ee7c10d;hb=ab85b17368dba24dbd60049d2bbe31713d585243;hpb=062d935971a96b788953448fc2b150056a41924e diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index 1517bd931c..d1230e00f1 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -3292,7 +3292,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware $this->trxEndCallbacks[] = [ $callback, $fname, $this->currentAtomicSectionId() ]; } - final public function onTransactionIdle( callable $callback, $fname = __METHOD__ ) { + final public function onTransactionCommitOrIdle( callable $callback, $fname = __METHOD__ ) { if ( !$this->trxLevel && $this->getTransactionRoundId() ) { // Start an implicit transaction similar to how query() does $this->begin( __METHOD__, self::TRANSACTION_INTERNAL ); @@ -3305,6 +3305,10 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware } } + final public function onTransactionIdle( callable $callback, $fname = __METHOD__ ) { + $this->onTransactionCommitOrIdle( $callback, $fname ); + } + final public function onTransactionPreCommitOrIdle( callable $callback, $fname = __METHOD__ ) { if ( !$this->trxLevel && $this->getTransactionRoundId() ) { // Start an implicit transaction similar to how query() does @@ -4634,5 +4638,12 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware } } -class_alias( Database::class, 'DatabaseBase' ); // b/c for old name -class_alias( Database::class, 'Database' ); // b/c global alias +/** + * @deprecated since 1.28 + */ +class_alias( Database::class, 'DatabaseBase' ); + +/** + * @deprecated since 1.29 + */ +class_alias( Database::class, 'Database' );