From ed76b67365492bae46f3e1d1891fad2aefb7a40b Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Wed, 31 Jan 2018 13:33:06 -0800 Subject: [PATCH] OutputPage: Remove methods deprecated in 1.27 or before Eighteen uses of readOnlyPage and three of addExtensionStyle; all have fixes awaiting merge. Marking as dependent on the only one in a Wikimedia-deployed extension. Depends-On: Ib3ea649bc68dd0edc025133721b46996d1e8901f Change-Id: I636ebc7dead55f1ae654a13d3b6ebb023ecfe8e1 --- RELEASE-NOTES-1.31 | 7 ++++ includes/OutputPage.php | 71 ----------------------------------------- 2 files changed, 7 insertions(+), 71 deletions(-) diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31 index 20bea0bd2a..9beaa8910d 100644 --- a/RELEASE-NOTES-1.31 +++ b/RELEASE-NOTES-1.31 @@ -199,6 +199,13 @@ changes to languages because of Phabricator reports. * ParserOutput objects generated using a non-default value for ParserOptions::setWrapOutputClass() can no longer be added to the parser cache. +* The following deprecated methods from the OutputPage class have been removed: + * OutputPage::addExtensionStyle(); deprecated in 1.27 + * OutputPage::getExtStyle(); deprecated in 1.27 + * OutputPage::setETag(); deprecated in 1.28 (obsolete no-op) + * OutputPage::setSquidMaxage(); deprecated in 1.27 + * OutputPage::readOnlyPage(); deprecated in 1.25 + * OutputPage::rateLimited(); deprecated in 1.25 == Compatibility == MediaWiki 1.31 requires PHP 5.5.9 or later. Although HHVM 3.18.5 or later is supported, diff --git a/includes/OutputPage.php b/includes/OutputPage.php index fc7fbf7220..5fa66e8c96 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -464,31 +464,6 @@ class OutputPage extends ContextSource { $this->mScripts .= $script; } - /** - * Register and add a stylesheet from an extension directory. - * - * @deprecated since 1.27 use addModuleStyles() or addStyle() instead - * @param string $url Path to sheet. Provide either a full url (beginning - * with 'http', etc) or a relative path from the document root - * (beginning with '/'). Otherwise it behaves identically to - * addStyle() and draws from the /skins folder. - */ - public function addExtensionStyle( $url ) { - wfDeprecated( __METHOD__, '1.27' ); - array_push( $this->mExtStyles, $url ); - } - - /** - * Get all styles added by extensions - * - * @deprecated since 1.27 - * @return array - */ - function getExtStyle() { - wfDeprecated( __METHOD__, '1.27' ); - return $this->mExtStyles; - } - /** * Add a JavaScript file out of skins/common, or a given relative path. * Internal use only. Use OutputPage::addModules() if possible. @@ -714,13 +689,6 @@ class OutputPage extends ContextSource { $this->mAdditionalBodyClasses = array_merge( $this->mAdditionalBodyClasses, (array)$classes ); } - /** - * @deprecated since 1.28 Obsolete - wgUseETag experiment was removed. - * @param string $tag - */ - public function setETag( $tag ) { - } - /** * Set whether the output should only contain the body of the article, * without any skin, sidebar, etc. @@ -1988,15 +1956,6 @@ class OutputPage extends ContextSource { return Parser::stripOuterParagraph( $parsed ); } - /** - * @param int $maxage - * @deprecated since 1.27 Use setCdnMaxage() instead - */ - public function setSquidMaxage( $maxage ) { - wfDeprecated( __METHOD__, '1.27' ); - $this->setCdnMaxage( $maxage ); - } - /** * Set the value of the "s-maxage" part of the "Cache-control" HTTP header * @@ -2660,36 +2619,6 @@ class OutputPage extends ContextSource { return $text; } - /** - * Display a page stating that the Wiki is in read-only mode. - * Should only be called after wfReadOnly() has returned true. - * - * Historically, this function was used to show the source of the page that the user - * was trying to edit and _also_ permissions error messages. The relevant code was - * moved into EditPage in 1.19 (r102024 / d83c2a431c2a) and removed here in 1.25. - * - * @deprecated since 1.25; throw the exception directly - * @throws ReadOnlyError - */ - public function readOnlyPage() { - if ( func_num_args() > 0 ) { - throw new MWException( __METHOD__ . ' no longer accepts arguments since 1.25.' ); - } - - throw new ReadOnlyError; - } - - /** - * Turn off regular page output and return an error response - * for when rate limiting has triggered. - * - * @deprecated since 1.25; throw the exception directly - */ - public function rateLimited() { - wfDeprecated( __METHOD__, '1.25' ); - throw new ThrottledError; - } - /** * Show a warning about replica DB lag * -- 2.20.1