From: Kunal Mehta Date: Sun, 31 May 2015 04:50:42 +0000 (-0700) Subject: Remove deprecated MWFunction::newObj() X-Git-Tag: 1.31.0-rc.0~11240 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=06cf009d885b5c0133e0293e3c9053c5273eb214;p=lhc%2Fweb%2Fwiklou.git Remove deprecated MWFunction::newObj() Change-Id: I180e9e1e0bcf17c9e72b607c69cae00f47de6579 --- diff --git a/RELEASE-NOTES-1.26 b/RELEASE-NOTES-1.26 index 64261a4a11..e51234eb8f 100644 --- a/RELEASE-NOTES-1.26 +++ b/RELEASE-NOTES-1.26 @@ -54,6 +54,8 @@ changes to languages because of Bugzilla reports. one function. The callback can't be called directly any more. The callback function is replaced with confirmCloseWindow.release(). * Removed maintenance script deleteImageMemcached.php. +* MWFunction::newObj() was removed (deprecated in 1.25). + ObjectFactory::getObjectFromSpec() should be used instead. == Compatibility == diff --git a/autoload.php b/autoload.php index 8749310318..612bc963ce 100644 --- a/autoload.php +++ b/autoload.php @@ -708,7 +708,6 @@ $wgAutoloadLocalClasses = array( 'MWDocGen' => __DIR__ . '/maintenance/mwdocgen.php', 'MWException' => __DIR__ . '/includes/exception/MWException.php', 'MWExceptionHandler' => __DIR__ . '/includes/exception/MWExceptionHandler.php', - 'MWFunction' => __DIR__ . '/includes/utils/MWFunction.php', 'MWHookException' => __DIR__ . '/includes/Hooks.php', 'MWHttpRequest' => __DIR__ . '/includes/HttpFunctions.php', 'MWMemcached' => __DIR__ . '/includes/objectcache/MemcachedClient.php', diff --git a/includes/utils/MWFunction.php b/includes/utils/MWFunction.php deleted file mode 100644 index fa7eebe825..0000000000 --- a/includes/utils/MWFunction.php +++ /dev/null @@ -1,40 +0,0 @@ - $class, - 'args' => $args, - 'closure_expansion' => false, - ) ); - } -} diff --git a/tests/phpunit/includes/utils/MWFunctionTest.php b/tests/phpunit/includes/utils/MWFunctionTest.php deleted file mode 100644 index f4d17999a0..0000000000 --- a/tests/phpunit/includes/utils/MWFunctionTest.php +++ /dev/null @@ -1,34 +0,0 @@ -hideDeprecated( 'MWFunction::newObj' ); - $this->assertEquals( - MWFunction::newObj( 'MWBlankClass', $args )->args, - $newObject->args - ); - } -} - -class MWBlankClass { - - public $args = array(); - - function __construct( $arg1, $arg2, $arg3, $arg4 ) { - $this->args = array( $arg1, $arg2, $arg3, $arg4 ); - } -} - -class ExampleObject { -}