From 2e020a25f08c20370c73fb5a2c0f7adf66e6ce4b Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sat, 22 Apr 2023 20:16:00 +0200 Subject: [PATCH] Remove deprecated CommentStore::getStore Bug: T325475 Change-Id: I0ff5e286cd15f45515e75fa85db529758e8f5ed9 --- RELEASE-NOTES-1.41 | 1 + includes/CommentStore/CommentStore.php | 11 ----------- tests/phpunit/includes/CommentStoreTest.php | 5 ----- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/RELEASE-NOTES-1.41 b/RELEASE-NOTES-1.41 index 947647ded4c..16a853bcca0 100644 --- a/RELEASE-NOTES-1.41 +++ b/RELEASE-NOTES-1.41 @@ -81,6 +81,7 @@ because of Phabricator reports. === Breaking changes in 1.41 === * Article::doDelete(), deprecated since 1.37, has been removed. +* CommentStore::getStore(), deprecated since 1.31, has been removed. * Article::getRedirectHeaderHtml() no longer accepts an array as $target. Passing an array was deprecated in 1.39. * IDatabase::wasErrorReissuable(), deprecated since 1.40, has been removed. diff --git a/includes/CommentStore/CommentStore.php b/includes/CommentStore/CommentStore.php index 542df23c842..de4b997f427 100644 --- a/includes/CommentStore/CommentStore.php +++ b/includes/CommentStore/CommentStore.php @@ -21,7 +21,6 @@ namespace MediaWiki\CommentStore; use Language; -use MediaWiki\MediaWikiServices; /** * @defgroup CommentStore CommentStore @@ -78,16 +77,6 @@ class CommentStore extends CommentStoreBase { $this->tempTables[$key]['stage'] = $stageOverride; } } - - /** - * @since 1.31 - * @deprecated in 1.31 Use DI to inject a CommentStore instance into your class. Hard-deprecated since 1.40. - * @return CommentStore - */ - public static function getStore() { - wfDeprecated( __METHOD__, '1.31' ); - return MediaWikiServices::getInstance()->getCommentStore(); - } } class_alias( CommentStore::class, 'CommentStore' ); diff --git a/tests/phpunit/includes/CommentStoreTest.php b/tests/phpunit/includes/CommentStoreTest.php index 13292d8541f..667253683df 100644 --- a/tests/phpunit/includes/CommentStoreTest.php +++ b/tests/phpunit/includes/CommentStoreTest.php @@ -856,9 +856,4 @@ class CommentStoreTest extends MediaWikiLangTestCase { ] ); } - public function testGetStore() { - $this->hideDeprecated( 'MediaWiki\\CommentStore\\CommentStore::getStore' ); - $this->assertInstanceOf( CommentStore::class, CommentStore::getStore() ); - } - }