use MediaWikiServices::getInstance()->getParser()

This commit is contained in:
Universal Omega 2021-05-27 20:54:53 -06:00 committed by GitHub
parent f713ac03aa
commit 98b0038c92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,7 @@
namespace PortableInfobox\Helpers;
use MediaWiki\Logger\LoggerFactory;
use MediaWiki\MediaWikiServices;
class PortableInfoboxParsingHelper {
@ -26,7 +27,7 @@ class PortableInfoboxParsingHelper {
$templateText = $this->fetchArticleContent( $title );
if ( $templateText ) {
$parser = new \Parser();
$parser = MediaWikiServices::getInstance()->getParser();
$parser->setTitle( $title );
$parserOptions = new \ParserOptions();
$frame = $parser->getPreprocessor()->newFrame();