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 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)

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 subscribed.

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

Jon, please review my release-notes.

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