From a1f26de80412e30a38e902529a45c6507e957499 Mon Sep 17 00:00:00 2001 From: Daimona Eaytoy Date: Sun, 8 Mar 2020 13:54:27 +0100 Subject: [PATCH] Remove deprecated methods in the Interwiki class codesearch lists 0 usages: https://codesearch.wmflabs.org/deployed/?q=%3A%3A(isValidInterwiki%7Cfetch%7CinvalidateCache%7CgetAllPrefixes)%5C(&i=nope&files=&repos= Change-Id: Ieea4ee724197d949db31c0430a8460ee273f9aba --- RELEASE-NOTES-1.35 | 2 ++ includes/interwiki/Interwiki.php | 52 -------------------------------- 2 files changed, 2 insertions(+), 52 deletions(-) diff --git a/RELEASE-NOTES-1.35 b/RELEASE-NOTES-1.35 index 30f581c2b2a..99a0073fa0b 100644 --- a/RELEASE-NOTES-1.35 +++ b/RELEASE-NOTES-1.35 @@ -313,6 +313,8 @@ because of Phabricator reports. ServiceAlreadyDefinedException, ServiceContainer and ServiceDisabledException in the global namespace, deprecated in 1.33, were removed. Use the classes in the MediaWiki\\Services namespace instead. +* The following methods in the Interwiki class were removed: ::fetch(), + ::isValidInterwiki(), ::invalidateCache(), and ::getAllPrefixes(). * The UsersMultiselectWidget config 'allowArbitrary' is now false by default. To accept arbitrary entries, pass in true for this config. * OutputPage::parse() and OutputPage::parseInline(), deprecated in 1.32, have diff --git a/includes/interwiki/Interwiki.php b/includes/interwiki/Interwiki.php index 30826d4c2a7..0b0d5f1d323 100644 --- a/includes/interwiki/Interwiki.php +++ b/includes/interwiki/Interwiki.php @@ -19,7 +19,6 @@ * * @file */ -use MediaWiki\MediaWikiServices; /** * Value object for representing interwiki records. @@ -57,57 +56,6 @@ class Interwiki { $this->mTrans = (bool)$trans; } - /** - * Check whether an interwiki prefix exists - * - * @deprecated since 1.28, use InterwikiLookup instead - * - * @param string $prefix Interwiki prefix to use - * @return bool Whether it exists - */ - public static function isValidInterwiki( $prefix ) { - wfDeprecated( __METHOD__, '1.28' ); - return MediaWikiServices::getInstance()->getInterwikiLookup()->isValidInterwiki( $prefix ); - } - - /** - * Fetch an Interwiki object - * - * @deprecated since 1.28, use InterwikiLookup instead - * - * @param string $prefix Interwiki prefix to use - * @return Interwiki|null|bool - */ - public static function fetch( $prefix ) { - wfDeprecated( __METHOD__, '1.28' ); - return MediaWikiServices::getInstance()->getInterwikiLookup()->fetch( $prefix ); - } - - /** - * Purge the cache (local and persistent) for an interwiki prefix. - * - * @param string $prefix - * @since 1.26 - */ - public static function invalidateCache( $prefix ) { - wfDeprecated( __METHOD__, '1.28' ); - MediaWikiServices::getInstance()->getInterwikiLookup()->invalidateCache( $prefix ); - } - - /** - * Returns all interwiki prefix definitions. - * - * @deprecated since 1.28, unused. Use InterwikiLookup instead. - * - * @param string|null $local If set, limits output to local/non-local interwikis - * @return array[] List of interwiki rows - * @since 1.19 - */ - public static function getAllPrefixes( $local = null ) { - wfDeprecated( __METHOD__, '1.28' ); - return MediaWikiServices::getInstance()->getInterwikiLookup()->getAllPrefixes( $local ); - } - /** * Get the URL for a particular title (or with $1 if no title given) *