Merge "resourceloader: Use null-objects for 'sources' and 'registry'"
[lhc/web/wiklou.git] / maintenance / parse.php
index b87a716..d9a247c 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+use MediaWiki\MediaWikiServices;
+
 /**
  * Parse some wikitext.
  *
@@ -46,7 +49,7 @@
  * @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';
@@ -103,9 +106,7 @@ class CLIParser extends Maintenance {
        }
 
        protected function initParser() {
-               global $wgParserConf;
-               $parserClass = $wgParserConf['class'];
-               $this->parser = new $parserClass();
+               $this->parser = MediaWikiServices::getInstance()->getParserFactory()->create();
        }
 
        /**