<?php
+use Wikimedia\Rdbms\IDatabase;
use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
use MediaWiki\Linker\LinkTarget;
+use MediaWiki\MediaWikiServices;
use Wikimedia\Assert\Assert;
use Wikimedia\ScopedCallback;
+use Wikimedia\Rdbms\LoadBalancer;
/**
* Storage layer class for WatchedItems.
* Database interaction.
*
- * @author Addshore
+ * Uses database because this uses User::isAnon
+ *
+ * @group Database
*
+ * @author Addshore
* @since 1.27
*/
class WatchedItemStore implements StatsdAwareInterface {
global $wgUpdateRowsPerQuery;
$dbw = $this->getConnectionRef( DB_MASTER );
- $factory = wfGetLBFactory();
+ $factory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
$ticket = $factory->getEmptyTransactionTicket( __METHOD__ );
$watchersChunks = array_chunk( $watchers, $wgUpdateRowsPerQuery );