Merge "resourceloader: Use null-objects for 'sources' and 'registry'"
[lhc/web/wiklou.git] / maintenance / parse.php
index cf2fe54..d9a247c 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+use MediaWiki\MediaWikiServices;
+
 /**
  * Parse some wikitext.
  *
@@ -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();
        }
 
        /**