From 9e82d412216ea07a25dbfddcd3e2e7e5e579150c Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Thu, 7 Feb 2019 17:02:52 -0800 Subject: [PATCH] Remove Title->canTalk, deprecated in 1.30, unused Change-Id: I0c397f8d33a2841343c7907b233530bf3c88e212 --- RELEASE-NOTES-1.33 | 2 ++ includes/Title.php | 11 ----------- tests/phpunit/includes/TitleTest.php | 12 ------------ 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/RELEASE-NOTES-1.33 b/RELEASE-NOTES-1.33 index 51734cfb18..16d4d1e8e8 100644 --- a/RELEASE-NOTES-1.33 +++ b/RELEASE-NOTES-1.33 @@ -195,6 +195,8 @@ because of Phabricator reports. Title->getCdnUrls(). * Title::escapeFragmentForURL(), deprecated in 1.30, was removed. Use Sanitizer::escapeIdForLink() or escapeIdForExternalInterwiki() instead. +* Title->canTalk(), deprecated in 1.30, was removed. Instead, use + Title->canHaveTalkPage(). === Deprecations in 1.33 === * The configuration option $wgUseESI has been deprecated, and is expected diff --git a/includes/Title.php b/includes/Title.php index 9303a5cd5f..b24f120f85 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1054,17 +1054,6 @@ class Title implements LinkTarget, IDBAccessObject { getNsText( MWNamespace::getTalk( $this->mNamespace ) ); } - /** - * Can this title have a corresponding talk page? - * - * @deprecated since 1.30, use canHaveTalkPage() instead. - * - * @return bool True if this title either is a talk page or can have a talk page associated. - */ - public function canTalk() { - return $this->canHaveTalkPage(); - } - /** * Can this title have a corresponding talk page? * diff --git a/tests/phpunit/includes/TitleTest.php b/tests/phpunit/includes/TitleTest.php index f36fbfd1d5..9c1d5afdbe 100644 --- a/tests/phpunit/includes/TitleTest.php +++ b/tests/phpunit/includes/TitleTest.php @@ -730,18 +730,6 @@ class TitleTest extends MediaWikiTestCase { $this->assertSame( $expected, $actual, $title->getPrefixedDBkey() ); } - /** - * @dataProvider provideCanHaveTalkPage - * @covers Title::canTalk - * - * @param Title $title - * @param bool $expected - */ - public function testCanTalk( Title $title, $expected ) { - $actual = $title->canTalk(); - $this->assertSame( $expected, $actual, $title->getPrefixedDBkey() ); - } - public static function provideGetTalkPage_good() { return [ [ Title::makeTitle( NS_MAIN, 'Test' ), Title::makeTitle( NS_TALK, 'Test' ) ], -- 2.20.1