Yaron Koren has submitted this change and it was merged.

Change subject: Use \SMW\ParserFunctionFactory instead
......................................................................


Use \SMW\ParserFunctionFactory instead

Requires [1] in order to elminate DI exposure

[1] https://gerrit.wikimedia.org/r/#/c/71250/

Change-Id: Ie0d51faa00478b6188b80621864895a5c0d6dd39
---
M SIO_SubobjectAlias.php
1 file changed, 2 insertions(+), 11 deletions(-)

Approvals:
  Yaron Koren: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/SIO_SubobjectAlias.php b/SIO_SubobjectAlias.php
index 1402a07..67c23bf 100644
--- a/SIO_SubobjectAlias.php
+++ b/SIO_SubobjectAlias.php
@@ -57,11 +57,7 @@
 
                if ( class_exists( 'SMW\SubobjectParserFunction' ) ) {
                        // SMW 1.9+
-                       $subobjectFunction = new SMW\SubobjectParserFunction(
-                               new SMW\ParserData( $parser->getTitle(), 
$parser->getOutput() ),
-                               new SMW\Subobject( $parser->getTitle() ),
-                               new SMW\MessageFormatter( 
$parser->getTargetLanguage() )
-                       );
+                       $subobjectFunction = 
\SMW\ParserFunctionFactory::newFromParser( $parser )->getSubobjectParser();
                        return $subobjectFunction->parse( new 
SMW\ParserParameterFormatter( $subobjectArgs ) );
                } else {
                        // SMW 1.8
@@ -81,12 +77,7 @@
 
                if ( class_exists( 'SMW\RecurringEventsParserFunction' ) ) {
                        // SMW 1.9+
-                       $recurringEventFunction = new 
SMW\RecurringEventsParserFunction(
-                               new SMW\ParserData( $parser->getTitle(), 
$parser->getOutput() ),
-                               new SMW\Subobject( $parser->getTitle() ),
-                               new SMW\MessageFormatter( 
$parser->getTargetLanguage() ),
-                               \SMW\Settings::newFromGlobals()
-                       );
+                       $recurringEventFunction = 
\SMW\ParserFunctionFactory::newFromParser( $parser 
)->getRecurringEventsParser();
                        return $recurringEventFunction->parse( new 
SMW\ParserParameterFormatter( $params ) );
                } else {
                        // SMW 1.8

-- 
To view, visit https://gerrit.wikimedia.org/r/71251
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0d51faa00478b6188b80621864895a5c0d6dd39
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticInternalObjects
Gerrit-Branch: master
Gerrit-Owner: Mwjames <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to