<?php
+
+use MediaWiki\MediaWikiServices;
+
/**
* Parse some wikitext.
*
* @file
* @ingroup Maintenance
* @author Antoine Musso <hashar at free dot fr>
- * @license GNU General Public License 2.0 or later
+ * @license GPL-2.0-or-later
*/
require_once __DIR__ . '/Maintenance.php';
}
protected function initParser() {
- global $wgParserConf;
- $parserClass = $wgParserConf['class'];
- $this->parser = new $parserClass();
+ $this->parser = MediaWikiServices::getInstance()->getParserFactory()->create();
}
/**
}
}
-$maintClass = "CLIParser";
+$maintClass = CLIParser::class;
require_once RUN_MAINTENANCE_IF_MAIN;