Page MenuHomePhabricator

Revert removal of SpecialSearchNogomatch and deprecate for removal properly
Closed, ResolvedPublic

Description

https://gerrit.wikimedia.org/r/#/c/320305 removed the hook SpecialSearchNogomatch. It did it without any prior deprecation, leaving references to it in hooks.txt. It wasn't mentioned in RELEASE-NOTES and mediawiki.org wasn't updated till I did it today -- https://www.mediawiki.org/w/index.php?title=Manual:Hooks/SpecialSearchNogomatch&curid=20309&diff=2420292&oldid=1421499

It's used in two extensions:

Targets
    Occurrences of 'SpecialSearchNogomatch' in Directory /Users/reedy/PhpstormProjects/MediaWiki/extensions
Found Occurrences  (4 usages found)
    Unclassified occurrence  (1 usage found)
        MediaWiki  (1 usage found)
            extensions/SearchStats  (1 usage found)
                SearchStats.hooks.php  (1 usage found)
                    39public static function onSpecialSearchNogomatch( &$title ) 
    Usage in comments  (1 usage found)
        MediaWiki  (1 usage found)
            extensions/SearchStats  (1 usage found)
                SearchStats.hooks.php  (1 usage found)
                    37	* https://www.mediawiki.org/wiki/Manual:Hooks/SpecialSearchNogomatch
    Usage in string constants  (2 usages found)
        MediaWiki  (2 usages found)
            extensions/SearchStats  (1 usage found)
                SearchStats.php  (1 usage found)
                    47$wgHooks['SpecialSearchNogomatch'][] = 'SearchStatsHooks::onSpecialSearchNogomatch';
            extensions/WikiLexicalData  (1 usage found)
                App.php  (1 usage found)
                    171$wgHooks['SpecialSearchNogomatch'][] = 'WikiLexicalDataHooks::onNoGoMatchHook';

Please revert the change (some modification will probably be needed to put it back in the new/right place), deprecate it properly (annotating in RELEASE-NOTES and on the hook itself it's deprecated). Then optionally, update the usages in extensions, so it can be removed from MW core in a later release

See also: https://www.mediawiki.org/wiki/Deprecation

Event Timeline

Reedy created this task.Mar 14 2017, 5:48 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 14 2017, 5:48 PM
Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptMar 14 2017, 5:49 PM
Reedy triaged this task as High priority.Mar 14 2017, 5:51 PM
Reedy updated the task description. (Show Details)Mar 14 2017, 6:04 PM

@EBernhardson will take a look at this.

Change 342687 had a related patch set uploaded (by EBernhardson):
[mediawiki/core] Revert "[search] Remove more dead code"

https://gerrit.wikimedia.org/r/342687

Change 342687 merged by jenkins-bot:
[mediawiki/core] Revert "[search] Remove more dead code"

https://gerrit.wikimedia.org/r/342687

Reedy closed this task as Resolved.Mar 16 2017, 12:06 PM

Oh damn, sorry for merging this change. I'm pretty sure I searched for usages, but it turns out I did something wrong, as I searched again and found the usages, so it's clearly my fault :(