From 06cf009d885b5c0133e0293e3c9053c5273eb214 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sat, 30 May 2015 21:50:42 -0700 Subject: [PATCH] Remove deprecated MWFunction::newObj() Change-Id: I180e9e1e0bcf17c9e72b607c69cae00f47de6579 --- RELEASE-NOTES-1.26 | 2 + autoload.php | 1 - includes/utils/MWFunction.php | 40 ------------------- .../phpunit/includes/utils/MWFunctionTest.php | 34 ---------------- 4 files changed, 2 insertions(+), 75 deletions(-) delete mode 100644 includes/utils/MWFunction.php delete mode 100644 tests/phpunit/includes/utils/MWFunctionTest.php 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 { -} -- 2.20.1