From: Kunal Mehta Date: Mon, 28 May 2018 06:16:28 +0000 (-0700) Subject: Deprecate Parser::fetchFile() since it's unused X-Git-Tag: 1.34.0-rc.0~5268^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=5952d843079cbfc22b64e0b0266fe223d0929399 Deprecate Parser::fetchFile() since it's unused Change-Id: Ic2bc3dd0479a373159a22da5f0a6961e212352ff --- diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index c1b579afad..c54227a8a7 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -144,6 +144,7 @@ because of Phabricator reports. with the 'unwatch' action parameter instead. * IcuCollation::getICUVersion() is deprecated, as you can just use the PHP constant INTL_ICU_VERSION directly in all versions that MediaWiki supports. +* Parser::fetchFile() is deprecated. Use ::fetchFileAndTitle() instead. === Other changes in 1.32 === * Soft hyphens (U+00AD) are now automatically removed from titles; these diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 2696f4d27a..dfd9602de3 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3689,8 +3689,10 @@ class Parser { * @param Title $title * @param array $options Array of options to RepoGroup::findFile * @return File|bool + * @deprecated since 1.32, use fetchFileAndTitle instead */ public function fetchFile( $title, $options = [] ) { + wfDeprecated( __METHOD__, '1.32' ); return $this->fetchFileAndTitle( $title, $options )[0]; }