Pass array to ParserOutput::addModules()/addModuleStyles() (#65)

To fix deprecation notices on MediaWiki 1.38+
This commit is contained in:
Universal Omega 2022-03-11 13:48:19 -07:00 committed by GitHub
parent 44c3389d5a
commit fffbcaac5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,8 +124,8 @@ class PortableInfoboxParserTagController {
$markup = '<' . self::PARSER_TAG_NAME . '>' . $text . '</' . self::PARSER_TAG_NAME . '>';
$parserOutput = $parser->getOutput();
$parserOutput->addModuleStyles( 'ext.PortableInfobox.styles' );
$parserOutput->addModules( 'ext.PortableInfobox.scripts' );
$parserOutput->addModuleStyles( [ 'ext.PortableInfobox.styles' ] );
$parserOutput->addModules( [ 'ext.PortableInfobox.scripts' ] );
try {
$renderedValue = $this->render( $markup, $parser, $frame, $params );