"jakub-onderka/php-parallel-lint": "0.9.2",
"jetbrains/phpstorm-stubs": "dev-master#38ff1a581b297f7901e961b8c923862ea80c3b96",
"justinrainbow/json-schema": "~5.2",
- "mediawiki/mediawiki-codesniffer": "22.0.0",
+ "mediawiki/mediawiki-codesniffer": "23.0.0",
"monolog/monolog": "~1.22.1",
"nikic/php-parser": "3.1.3",
"seld/jsonlint": "1.7.1",
}
// @TODO: remove this hack once rollback uses POST (T88044)
+ $fname = __METHOD__;
$trxLimits = $this->context->getConfig()->get( 'TrxProfilerLimits' );
$trxProfiler = Profiler::instance()->getTransactionProfiler();
- $trxProfiler->setExpectations( $trxLimits['POST'], __METHOD__ );
- DeferredUpdates::addCallableUpdate( function () use ( $trxProfiler, $trxLimits ) {
- $trxProfiler->setExpectations( $trxLimits['PostSend-POST'], __METHOD__ );
+ $trxProfiler->setExpectations( $trxLimits['POST'], $fname );
+ DeferredUpdates::addCallableUpdate( function () use ( $trxProfiler, $trxLimits, $fname ) {
+ $trxProfiler->setExpectations( $trxLimits['PostSend-POST'], $fname );
} );
$data = null;
}
// @TODO: remove this hack once rollback uses POST (T88044)
+ $fname = __METHOD__;
$trxLimits = $this->getConfig()->get( 'TrxProfilerLimits' );
$trxProfiler = Profiler::instance()->getTransactionProfiler();
- $trxProfiler->setExpectations( $trxLimits['POST'], __METHOD__ );
- DeferredUpdates::addCallableUpdate( function () use ( $trxProfiler, $trxLimits ) {
- $trxProfiler->setExpectations( $trxLimits['PostSend-POST'], __METHOD__ );
+ $trxProfiler->setExpectations( $trxLimits['POST'], $fname );
+ DeferredUpdates::addCallableUpdate( function () use ( $trxProfiler, $trxLimits, $fname ) {
+ $trxProfiler->setExpectations( $trxLimits['PostSend-POST'], $fname );
} );
$retval = $pageObj->doRollback(
foreach ( $tagsToAdd as $tag ) {
$changeTagMapping[$tag] = $changeTagDefStore->acquireId( $tag );
}
+ $fname = __METHOD__;
// T207881: update the counts at the end of the transaction
- $dbw->onTransactionPreCommitOrIdle( function () use ( $dbw, $tagsToAdd ) {
+ $dbw->onTransactionPreCommitOrIdle( function () use ( $dbw, $tagsToAdd, $fname ) {
$dbw->update(
'change_tag_def',
[ 'ctd_count = ctd_count + 1' ],
[ 'ctd_name' => $tagsToAdd ],
- __METHOD__
+ $fname
);
} );
// delete from change_tag
if ( count( $tagsToRemove ) ) {
+ $fname = __METHOD__;
foreach ( $tagsToRemove as $tag ) {
$conds = array_filter(
[
$dbw->delete( 'change_tag', $conds, __METHOD__ );
if ( $dbw->affectedRows() ) {
// T207881: update the counts at the end of the transaction
- $dbw->onTransactionPreCommitOrIdle( function () use ( $dbw, $tag ) {
+ $dbw->onTransactionPreCommitOrIdle( function () use ( $dbw, $tag, $fname ) {
$dbw->update(
'change_tag_def',
[ 'ctd_count = ctd_count - 1' ],
[ 'ctd_name' => $tag ],
- __METHOD__
+ $fname
);
$dbw->delete(
'change_tag_def',
[ 'ctd_name' => $tag, 'ctd_count' => 0, 'ctd_user_defined' => 0 ],
- __METHOD__
+ $fname
);
} );
}
'change_tag_def',
'ctd_name',
[ 'ctd_user_defined' => 1 ],
- __METHOD__
+ $fname
);
return array_filter( array_unique( $tags ) );
public function doUpdate() {
$lb = MediaWikiServices::getInstance()->getDBLoadBalancer();
$dbw = $lb->getConnection( DB_MASTER );
+ $fname = __METHOD__;
- ( new AutoCommitUpdate( $dbw, __METHOD__, function () use ( $lb, $dbw ) {
+ ( new AutoCommitUpdate( $dbw, __METHOD__, function () use ( $lb, $dbw, $fname ) {
foreach ( $this->infoByUser as $userId => $info ) {
$dbw->update(
'user',
[ 'user_editcount=user_editcount+' . (int)$info['increment'] ],
[ 'user_id' => $userId, 'user_editcount IS NOT NULL' ],
- __METHOD__
+ $fname
);
/** @var User[] $affectedInstances */
$affectedInstances = $info['instances'];
if ( $dbr !== $dbw ) {
// This method runs after the new revisions were committed.
// Wait for the replica to catch up so they will all be counted.
- $dbr->flushSnapshot( __METHOD__ );
+ $dbr->flushSnapshot( $fname );
$lb->safeWaitForMasterPos( $dbr );
}
$affectedInstances[0]->initEditCountInternal();
'user',
[ 'user_editcount' ],
[ 'user_id' => $userId ],
- __METHOD__
+ $fname
);
// Update the edit count in the instance caches. This is mostly useful