From cfa0717d4ac572549fbc00fba3f48a4cac7f4d3b Mon Sep 17 00:00:00 2001 From: Amir Sarabadani Date: Mon, 18 Jun 2018 18:34:48 +0200 Subject: [PATCH] Move lbFactory defintion from construct to execute in populateChangeTagDef It seems the class doesn't load needed classes in construct so we get Uncaught Error: Class 'MediaWiki\MediaWikiServices' not found Bug: T193871 Change-Id: I0d6a49232cbc256a34ab49e8a4e41f6cc942fe4b --- maintenance/populateChangeTagDef.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maintenance/populateChangeTagDef.php b/maintenance/populateChangeTagDef.php index c815d8dba4..3b32c004a7 100644 --- a/maintenance/populateChangeTagDef.php +++ b/maintenance/populateChangeTagDef.php @@ -24,7 +24,7 @@ require_once __DIR__ . '/Maintenance.php'; * @ingroup Maintenance */ class PopulateChangeTagDef extends Maintenance { - /** @var Wikimedia\Rdbms\LBFactory */ + /** @var Wikimedia\Rdbms\ILBFactory */ protected $lbFactory; public function __construct() { @@ -38,11 +38,11 @@ class PopulateChangeTagDef extends Maintenance { false, true ); - $this->lbFactory = MediaWiki\MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); } public function execute() { global $wgChangeTagsSchemaMigrationStage; + $this->lbFactory = MediaWiki\MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); $this->setBatchSize( $this->getOption( 'batch-size', $this->getBatchSize() ) ); $this->countDown( 5 ); -- 2.20.1