parser: Remove unused ParserAfterUnstrip hook

Introduced in 2015 via If83b062. Unfortunately the patch fails to mention
why the hook was introduced. A review comment asking for the missing
information was ignored.

The hook was introduced exclusively for the Cite extension, see I0e136f9.
The Cite change got reverted a few days later via I1a71854. As far as I
can tell the hook (oddly specific and underspecified anyway) was never
used again, neither for Cite nor for anything else.

Now unused: https://codesearch.wmflabs.org/search/?q=ParserAfterUnstrip

I suggest to just remove it with no deprecation phase.

My team is currently working on Cite, essentially turning it upside down.
I'm not aware of a need for this hook.

Change-Id: If68a88d7afff60385ff1e33fd13716b20d01a313
This commit is contained in:
Thiemo Kreuz 2020-01-23 09:29:54 +01:00
parent 8a19838915
commit ea01e7cfbb
3 changed files with 1 additions and 9 deletions

View file

@ -227,6 +227,7 @@ because of Phabricator reports.
MediaWikiServices).
* ApiBase::checkTitleUserPermissions no longer accepts a User as the third
parameter. Passing a user was deprecated in 1.33.
* The ParserAfterUnstrip hook was removed without deprecation.
* …
=== Deprecations in 1.35 ===

View file

@ -2536,11 +2536,6 @@ $parser: parser object
$parser: Parser object being used
&$text: text that will be returned
'ParserAfterUnstrip': Called after the first unstripGeneral() in
Parser::internalParseHalfParsed()
$parser: Parser object being used
&$text: text that will be returned
'ParserBeforeInternalParse': Called at the beginning of Parser::internalParse().
$parser: Parser object
&$text: text to parse

View file

@ -1529,10 +1529,6 @@ class Parser {
// Avoid PHP 7.1 warning from passing $this by reference
$parser = $this;
if ( $isMain ) {
Hooks::run( 'ParserAfterUnstrip', [ &$parser, &$text ] );
}
# Clean up special characters, only run once, next-to-last before doBlockLevels
$text = Sanitizer::armorFrenchSpaces( $text );