From: Derick Alangi Date: Sun, 8 Sep 2019 20:32:25 +0000 (+0100) Subject: StreamFile: Deprecate ::parseRange() and ::send404Message() methods X-Git-Tag: 1.34.0-rc.0~224^2 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;ds=sidebyside;h=362be047d0477469044c1be39f8e995dcdc7f986;p=lhc%2Fweb%2Fwiklou.git StreamFile: Deprecate ::parseRange() and ::send404Message() methods StreamFile::parseRange() and StreamFile::send404Message() are now replaced by HTTPFileStreamer::parseRange() and HTTPFileStreamer::send404Message(). Change-Id: Id777211de42a225361ce068adaab64e3ddc03fdc --- diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index 07f52d0c1b..511ba654d8 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -564,6 +564,9 @@ because of Phabricator reports. * The GetBlockedStatus hook is deprecated. Use GetUserBlock instead, to add or remove a block. * $wgContentHandlerUseDB is deprecated and should always be true. +* StreamFile::send404Message() and StreamFile::parseRange() are now deprecated. + Use HTTPFileStreamer::send404Message() and HTTPFileStreamer::parseRange() + respectively instead. === Other changes in 1.34 === * … diff --git a/includes/StreamFile.php b/includes/StreamFile.php index dfe6badd41..1c4b6eade2 100644 --- a/includes/StreamFile.php +++ b/includes/StreamFile.php @@ -68,8 +68,10 @@ class StreamFile { * @param string $fname Full name and path of the file to stream * @param int $flags Bitfield of STREAM_* constants * @since 1.24 + * @deprecated since 1.34, use HTTPFileStreamer::send404Message() instead */ public static function send404Message( $fname, $flags = 0 ) { + wfDeprecated( __METHOD__, '1.34' ); HTTPFileStreamer::send404Message( $fname, $flags ); } @@ -80,8 +82,10 @@ class StreamFile { * @param int $size File size * @return array|string Returns error string on failure (start, end, length) * @since 1.24 + * @deprecated since 1.34, use HTTPFileStreamer::parseRange() instead */ public static function parseRange( $range, $size ) { + wfDeprecated( __METHOD__, '1.34' ); return HTTPFileStreamer::parseRange( $range, $size ); }