From ae09d19775d391c6d01128d435add351064261d8 Mon Sep 17 00:00:00 2001 From: Daimona Eaytoy Date: Fri, 28 Feb 2020 19:36:32 +0100 Subject: [PATCH] Hard-deprecate a few methods in the AbuseFilter class All usages fixed, see https://codesearch.wmflabs.org/search/?q=AbuseFilter%3A%3A(generate%7CgetEditVars)&i=nope&files=&repos= Depends-On: I49c635efbe46820e6340f64504f3bc417b78dde3 Change-Id: I45d11b2b015f4abf1ec9cedd14355f9c1c049bba --- includes/AbuseFilter.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/includes/AbuseFilter.php b/includes/AbuseFilter.php index cd0db2c2a..7648abc08 100644 --- a/includes/AbuseFilter.php +++ b/includes/AbuseFilter.php @@ -243,12 +243,13 @@ class AbuseFilter { ]; /** - * @deprecated Use VariableGenerator::addUserVars() + * @deprecated Since 1.35 Use VariableGenerator::addUserVars() * @param User $user * @param RecentChange|null $entry * @return AbuseFilterVariableHolder */ public static function generateUserVars( User $user, RecentChange $entry = null ) { + wfDeprecated( __METHOD__, '1.35' ); $vars = new AbuseFilterVariableHolder(); $generator = new VariableGenerator( $vars ); return $generator->addUserVars( $user, $entry )->getVariableHolder(); @@ -316,13 +317,14 @@ class AbuseFilter { } /** - * @deprecated Use VariableGenerator::addTitleVars + * @deprecated Since 1.35 Use VariableGenerator::addTitleVars * @param Title|null $title * @param string $prefix * @param RecentChange|null $entry * @return AbuseFilterVariableHolder */ public static function generateTitleVars( $title, $prefix, RecentChange $entry = null ) { + wfDeprecated( __METHOD__, '1.35' ); $vars = new AbuseFilterVariableHolder(); if ( !( $title instanceof Title ) ) { return $vars; @@ -332,10 +334,11 @@ class AbuseFilter { } /** - * @deprecated Use VariableGenerator::addGenericVars + * @deprecated Since 1.35 Use VariableGenerator::addGenericVars * @return AbuseFilterVariableHolder */ public static function generateGenericVars() { + wfDeprecated( __METHOD__, '1.35' ); $vars = new AbuseFilterVariableHolder(); $generator = new VariableGenerator( $vars ); return $generator->addGenericVars()->getVariableHolder();