jenkins-bot has submitted this change and it was merged.

Change subject: Fix SubobjectParserFunction name/class
......................................................................


Fix SubobjectParserFunction name/class

Won't change any logic but fixed namimg in 1.9 to ensure
consitency among file and class names, and prepares to push [1]
into 1.10 right away

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

Change-Id: I492fd8e3a9ef6b77b83172638a80eb9313163902
---
M SemanticMediaWiki.hooks.php
M includes/Setup.php
M includes/parserhooks/SubobjectParserFunction.php
R tests/phpunit/includes/parserhooks/SubobjectParserFunctionTest.php
4 files changed, 13 insertions(+), 13 deletions(-)

Approvals:
  Mwjames: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/SemanticMediaWiki.hooks.php b/SemanticMediaWiki.hooks.php
index 1acb1fd..de2a6fa 100644
--- a/SemanticMediaWiki.hooks.php
+++ b/SemanticMediaWiki.hooks.php
@@ -127,7 +127,7 @@
        public static function onParserFirstCallInit( Parser &$parser ) {
                $parser->setFunctionHook( 'ask', array( 'SMWAsk', 'render' ) );
                $parser->setFunctionHook( 'show', array( 'SMWShow', 'render' ) 
);
-               $parser->setFunctionHook( 'subobject', array( 
'SMW\SubobjectHandler', 'render' ) );
+               $parser->setFunctionHook( 'subobject', array( 
'SMW\SubobjectParserFunction', 'render' ) );
                $parser->setFunctionHook( 'concept', array( 'SMWConcept', 
'render' ) );
                $parser->setFunctionHook( 'set', array( 'SMW\SetParser', 
'render' ) );
                $parser->setFunctionHook( 'set_recurring_event', array( 
'SMW\RecurringEventsHandler', 'render' ) );
@@ -282,9 +282,9 @@
 
                        'export/SMWExpElement',
 
-                       'parserhooks/ParserParameter',
+                       'parserhooks/ParserParameterFormatter',
                        'parserhooks/Subobject',
-                       'parserhooks/SubobjectHandler',
+                       'parserhooks/SubobjectParserFunction',
                        'parserhooks/RecurringEvents',
 
                        'printers/ResultPrinters',
diff --git a/includes/Setup.php b/includes/Setup.php
index 5817016..7fbd634 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -209,7 +209,7 @@
        $wgAutoloadClasses['SMWSMWDoc']                 = $phDir . 
'SMW_SMWDoc.php';
        $wgAutoloadClasses['SMW\ParserParameterFormatter'] = $phDir . 
'ParserParameterFormatter.php';
        $wgAutoloadClasses['SMW\SetParser']             = $phDir . 
'SetParserFunction.php';
-       $wgAutoloadClasses['SMW\SubobjectHandler']      = $phDir . 
'SubobjectParserFunction.php';
+       $wgAutoloadClasses['SMW\SubobjectParserFunction'] = $phDir . 
'SubobjectParserFunction.php';
        $wgAutoloadClasses['SMW\Subobject']             = $phDir . 
'Subobject.php';
        $wgAutoloadClasses['SMW\RecurringEventsHandler'] = $phDir . 
'RecurringEventsParserFunction.php';
        $wgAutoloadClasses['SMW\RecurringEvents']       = $phDir . 
'RecurringEvents.php';
diff --git a/includes/parserhooks/SubobjectParserFunction.php 
b/includes/parserhooks/SubobjectParserFunction.php
index 1b5459c..25af142 100644
--- a/includes/parserhooks/SubobjectParserFunction.php
+++ b/includes/parserhooks/SubobjectParserFunction.php
@@ -35,7 +35,7 @@
  * @author mwjames
  * @author Markus Krötzsch
  */
-class SubobjectHandler {
+class SubobjectParserFunction {
 
        /**
         * Defines a subobject instance
diff --git a/tests/phpunit/includes/parserhooks/SubobjectHandlerTest.php 
b/tests/phpunit/includes/parserhooks/SubobjectParserFunctionTest.php
similarity index 85%
rename from tests/phpunit/includes/parserhooks/SubobjectHandlerTest.php
rename to tests/phpunit/includes/parserhooks/SubobjectParserFunctionTest.php
index ce935e2..9afa505 100644
--- a/tests/phpunit/includes/parserhooks/SubobjectHandlerTest.php
+++ b/tests/phpunit/includes/parserhooks/SubobjectParserFunctionTest.php
@@ -2,7 +2,7 @@
 
 namespace SMW\Test;
 
-use SMW\SubobjectHandler;
+use SMW\SubobjectParserFunction;
 use SMW\Subobject;
 use SMW\ParserParameterFormatter;
 
@@ -11,7 +11,7 @@
 use MWException;
 
 /**
- * Tests for the SMW\SubobjectHandler class.
+ * Tests for the SMW\SubobjectParserFunction class.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@
  * @licence GNU GPL v2+
  * @author mwjames
  */
-class SubobjectHandlerTest extends \MediaWikiTestCase {
+class SubobjectParserFunctionTest extends \MediaWikiTestCase {
 
        /**
         * DataProvider
@@ -73,7 +73,7 @@
 
                // FIXME Class instance
                $parameters = 
ParserParameterFormatter::singleton()->getParameters( $params );
-               $instance = new SubobjectHandler( $subject, $parameters );
+               $instance = new SubobjectParserFunction( $subject, $parameters 
);
                return $instance;
        }
 
@@ -87,11 +87,11 @@
                $subject = $this->getSubject( $expected['DBkey'] );
 
                // Raises an exception
-               $instance = new SubobjectHandler( $subject );
-               $this->assertInstanceOf( 'SMW\SubobjectHandler', $instance );
+               $instance = new SubobjectParserFunction( $subject );
+               $this->assertInstanceOf( 'SMW\SubobjectParserFunction', 
$instance );
 
-               $instance = new SubobjectHandler( $subject, $params );
-               $this->assertInstanceOf( 'SMW\SubobjectHandler', $instance );
+               $instance = new SubobjectParserFunction( $subject, $params );
+               $this->assertInstanceOf( 'SMW\SubobjectParserFunction', 
$instance );
        }
 
        /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I492fd8e3a9ef6b77b83172638a80eb9313163902
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Mwjames <[email protected]>
Gerrit-Reviewer: Mwjames <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to