From d24f7ad8bee01cbbebffa2608aef616b1a43002e Mon Sep 17 00:00:00 2001 From: DannyS712 Date: Mon, 29 Mar 2021 17:37:42 +0000 Subject: [PATCH] Remove hard deprecated EditPage spam regex methods ::matchSpamRegex and ::matchSummarySpamRegex, hard deprecated in favor of the SpamChecker service Change-Id: I90dca38abf1ef3411dd06138fdec198724de31fe --- RELEASE-NOTES-1.36 | 2 ++ includes/EditPage.php | 28 ---------------------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/RELEASE-NOTES-1.36 b/RELEASE-NOTES-1.36 index 299465f8366..879972146a7 100644 --- a/RELEASE-NOTES-1.36 +++ b/RELEASE-NOTES-1.36 @@ -288,6 +288,8 @@ because of Phabricator reports. - ::getSummaryInputWidget - ::noSuchSectionPage - ::initialiseForm +* EditPage::matchSpamRegex and ::matchSummarySpamRegex, deprecated in 1.35, + were removed. Use the SpamChecker service instead. * The global function `wfWaitForSlaves`, deprecated in 1.27 and hard-deprecated in 1.35, has been removed. Use LBFactory::waitForReplication() instead. * Calling Action::factory() with null as the first parameter, rather than a diff --git a/includes/EditPage.php b/includes/EditPage.php index f77d76770f2..23c715fb45b 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2626,34 +2626,6 @@ class EditPage implements IEditObject { return $this->mExpectedParentRevision; } - /** - * Check given input text against $wgSpamRegex, and return the text of the first match. - * - * @deprecated since 1.35, use the new SpamChecker service - * - * @param string $text - * - * @return string|bool Matching string or false - */ - public static function matchSpamRegex( $text ) { - wfDeprecated( __METHOD__, '1.35' ); - return MediaWikiServices::getInstance()->getSpamChecker()->checkContent( $text ); - } - - /** - * Check given input text against $wgSummarySpamRegex, and return the text of the first match. - * - * @deprecated since 1.35, use the new SpamChecker service - * - * @param string $text - * - * @return string|bool Matching string or false - */ - public static function matchSummarySpamRegex( $text ) { - wfDeprecated( __METHOD__, '1.35' ); - return MediaWikiServices::getInstance()->getSpamChecker()->checkSummary( $text ); - } - public function setHeaders() { $out = $this->context->getOutput();