From 976c50c21abc39c388b8b692dfa1e44bdc0063a3 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Wed, 10 Oct 2018 16:20:18 -0700 Subject: [PATCH] Drop ParserLimitReport, deprecated in 1.22 Change-Id: I4898d92569bd823f09c12f68fa186e2e139790a7 --- RELEASE-NOTES-1.32 | 2 ++ docs/hooks.txt | 7 ------- includes/parser/Parser.php | 2 -- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index bff52e5442..c51a031808 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -346,6 +346,8 @@ because of Phabricator reports. * The global function wfRunHooks, deprecated since 1.25, has now been removed. Use Hooks::run(). * The hook 'UnknownAction', deprecated since 1.19, has now been removed. +* The hook 'ParserLimitReport', deprecated since 1.22, has been removed. Use + the hooks 'ParserLimitReportPrepare' and 'ParserLimitReportFormat' instead. === Deprecations in 1.32 === * HTMLForm::setSubmitProgressive() is deprecated. No need to call it. Submit diff --git a/docs/hooks.txt b/docs/hooks.txt index 0641e88860..fd7b3005d7 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2647,13 +2647,6 @@ cache or return false to not use it. &$parser: Parser object &$varCache: variable cache (array) -'ParserLimitReport': DEPRECATED since 1.22! Use ParserLimitReportPrepare and -ParserLimitReportFormat instead. -Called at the end of Parser:parse() when the parser will -include comments about size of the text parsed. -$parser: Parser object -&$limitReport: text that will be included (without comment tags) - 'ParserLimitReportFormat': Called for each row in the parser limit report that needs formatting. If nothing handles this hook, the default is to use "$key" to get the label, and "$key-value" or "$key-value-text"/"$key-value-html" to diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 90ef335809..dcb2c89db1 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -612,8 +612,6 @@ class Parser { // Since we're not really outputting HTML, decode the entities and // then re-encode the things that need hiding inside HTML comments. $limitReport = htmlspecialchars_decode( $limitReport ); - // Run deprecated hook - Hooks::run( 'ParserLimitReport', [ $this, &$limitReport ], '1.22' ); // Sanitize for comment. Note '‐' in the replacement is U+2010, // which looks much like the problematic '-'. -- 2.20.1