MWNamespace: Remove deprecated method ::canTalk() and test suit
authorDerick Alangi <alangiderick@gmail.com>
Sat, 20 Apr 2019 15:24:39 +0000 (16:24 +0100)
committerDerick Alangi <alangiderick@gmail.com>
Sat, 20 Apr 2019 20:07:50 +0000 (21:07 +0100)
This method was deprecated in .30 hence remove as the usage is actually
zero in extensions and one only in core.

Usage:

https://codesearch.wmflabs.org/search/?q=%3A%3AcanTalk%5C(&i=nope&files=&repos=

Change-Id: Ia18c63f95c969d13c28ffb1afa376ec2df2002a3

RELEASE-NOTES-1.34
includes/MWNamespace.php
tests/phpunit/includes/title/NamespaceInfoTest.php

index c85d678..199b82c 100644 (file)
@@ -102,6 +102,7 @@ because of Phabricator reports.
   SearchEngine::getNearMatch(), methods deprecated in 1.27, have been removed.
 * FileRepo::streamFile(), deprecated in 1.26, has been removed.
 * User::randomPassword() method, deprecated in 1.27, have been removed.
+* MWNamespace::canTalk(), deprecated in 1.30, have been removed.
 
 === Deprecations in 1.34 ===
 * The MWNamespace class is deprecated. Use MediaWikiServices::getNamespaceInfo.
index 1529473..0121bd5 100644 (file)
@@ -176,19 +176,6 @@ class MWNamespace {
                return MediaWikiServices::getInstance()->getNamespaceInfo()->getValidNamespaces();
        }
 
-       /**
-        * Does this namespace ever have a talk namespace?
-        *
-        * @deprecated since 1.30, use hasTalkNamespace() instead.
-        *
-        * @param int $index Namespace index
-        * @return bool True if this namespace either is or has a corresponding talk namespace.
-        */
-       public static function canTalk( $index ) {
-               wfDeprecated( __METHOD__, '1.30' );
-               return self::hasTalkNamespace( $index );
-       }
-
        /**
         * Does this namespace ever have a talk namespace?
         *
index cc7df8d..21b6468 100644 (file)
@@ -246,19 +246,6 @@ class NamespaceInfoTest extends MediaWikiTestCase {
                $this->assertSame( $actual, $expected, "NS $index" );
        }
 
-       /**
-        * @dataProvider provideHasTalkNamespace
-        * @covers MWNamespace::canTalk
-        *
-        * @param int $index
-        * @param bool $expected
-        */
-       public function testCanTalk( $index, $expected ) {
-               $this->hideDeprecated( 'MWNamespace::canTalk' );
-               $actual = MWNamespace::canTalk( $index );
-               $this->assertSame( $actual, $expected, "NS $index" );
-       }
-
        private function assertIsContent( $ns ) {
                $this->assertTrue( $this->obj->isContent( $ns ) );
        }