Page MenuHomePhabricator

[Dev] Deprecate SkinTemplatePreventOtherActiveTabs and SkinTemplateTabAction hooks
Closed, ResolvedPublic

Description

NOTE: Deprecating these two unused hooks simplifies integration points with Vector and makes the code easier to work with.

Both are unused outside core:
https://codesearch.wmflabs.org/search/?q=SkinTemplatePreventOtherActiveTabs&i=nope&files=&repos=
https://codesearch.wmflabs.org/search/?q=SkinTemplateTabAction&i=nope&files=&repos=

Let's deprecate them immediately rather than support hooks that add complexity to skin rendering.

Developer notes

Hooks are how extensions integrate with mediawiki. They can also be registered in LocalSettings.php like so:

$wgHooks['SkinTemplatePreventOtherActiveTabs'][] = function (
	&$skinTemplate, &res
) {
	$res .= 'hello world!';
};

For the purpose of this task I suggest understanding how they hooks work and what they do, and then confirm that when marked as deprecated a deprecation warning shows up in MediaWiki.

Use
`
$wgDeprecationWarnings = true;
`
to show deprecation warnings.

Note: https://lists.wikimedia.org/pipermail/wikitech-l/2020-June/093461.html has some notes on how the deprecation process now works. It recently changed so don't rely on the code too much.

Event Timeline

Jdlrobson edited subscribers, added: Krinkle; removed: Jdlrobson.May 27 2020, 9:44 PM
Jdlrobson updated the task description. (Show Details)Jun 3 2020, 5:43 PM
Jdlrobson renamed this task from Deprecate SkinTemplatePreventOtherActiveTabs and SkinTemplateTabAction hooks to [Dev] Deprecate SkinTemplatePreventOtherActiveTabs and SkinTemplateTabAction hooks.Jun 3 2020, 5:48 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson assigned this task to vas.Jun 4 2020, 2:14 PM

Change 602668 had a related patch set uploaded (by Vas Yaremchuk; owner: Vas Yaremchuk):
[mediawiki/core@master] Deprecate SkinTemplatePreventOtherActiveTabs and SkinTemplateTabAction hooks

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

vas reassigned this task from vas to Jdlrobson.Jun 5 2020, 12:28 PM
vas added a subscriber: vas.

Jon, please review the patch.

Change 602668 merged by jenkins-bot:
[mediawiki/core@master] Deprecate SkinTemplatePreventOtherActiveTabs and SkinTemplateTabAction hooks

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

Change 605224 had a related patch set uploaded (by Vas Yaremchuk; owner: Vas Yaremchuk):
[mediawiki/core@master] release-notes: Deprecate SkinTemplatePreventOtherActiveTabs and SkinTemplateTabAction hooks

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

vas added a comment.Jun 12 2020, 1:50 PM

Jon, please review my release-notes.

vas reassigned this task from Jdlrobson to Ammarpad.Jun 15 2020, 11:59 AM
vas added a subscriber: Jdlrobson.

Ammar, please review it again.

Change 605224 had a related patch set uploaded (by Ammarpad; owner: Vas Yaremchuk):
[mediawiki/core@master] Add release-notes for two deprecated hooks

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

Change 605224 merged by jenkins-bot:
[mediawiki/core@master] Add release-notes for two deprecated hooks

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

Ammarpad reassigned this task from Ammarpad to vas.Jun 15 2020, 4:08 PM
Ammarpad added a subscriber: Ammarpad.