Remove SkinTemplateOutputPageBeforeExec Hook

Bug: T287773
Change-Id: Ieac3ca6a37c7991284851d6124febde0db8bb198
This commit is contained in:
Ammarpad 2021-07-30 22:29:12 +01:00
parent 0f8fd3cc46
commit 2e10b1b46c
6 changed files with 1 additions and 47 deletions

View file

@ -367,6 +367,7 @@ because of Phabricator reports.
* Previously a capitalize-all-nouns class was added to the body element of
languages where nouns must be capitalized. This class is no longer added to
the body tag and must be provided by skins.
* SkinTemplateOutputPageBeforeExecHook, deprecated since 1.35, was removed.
* …
=== Deprecations in 1.37 ===

View file

@ -1009,7 +1009,6 @@ $wgAutoloadLocalClasses = [
'MediaWiki\\Hook\\SkinTemplateNavigationHook' => __DIR__ . '/includes/skins/Hook/SkinTemplateNavigationHook.php',
'MediaWiki\\Hook\\SkinTemplateNavigation__SpecialPageHook' => __DIR__ . '/includes/skins/Hook/SkinTemplateNavigation__SpecialPageHook.php',
'MediaWiki\\Hook\\SkinTemplateNavigation__UniversalHook' => __DIR__ . '/includes/skins/Hook/SkinTemplateNavigation__UniversalHook.php',
'MediaWiki\\Hook\\SkinTemplateOutputPageBeforeExecHook' => __DIR__ . '/includes/skins/Hook/SkinTemplateOutputPageBeforeExecHook.php',
'MediaWiki\\Hook\\SkinTemplateToolboxEndHook' => __DIR__ . '/includes/skins/Hook/SkinTemplateToolboxEndHook.php',
'MediaWiki\\Hook\\SoftwareInfoHook' => __DIR__ . '/includes/specials/Hook/SoftwareInfoHook.php',
'MediaWiki\\Hook\\SpecialBlockModifyFormFieldsHook' => __DIR__ . '/includes/specials/Hook/SpecialBlockModifyFormFieldsHook.php',

View file

@ -52,7 +52,6 @@ class DeprecatedHooks {
'ResourceLoaderTestModules' => [ 'deprecatedVersion' => '1.33' ],
'RollbackComplete' => [ 'deprecatedVersion' => '1.36', 'silent' => true ],
'SpecialMuteSubmit' => [ 'deprecatedVersion' => '1.35', 'silent' => true ],
'SkinTemplateOutputPageBeforeExec' => [ 'deprecatedVersion' => '1.35' ],
'SkinTemplateToolboxEnd' => [ 'deprecatedVersion' => '1.35' ],
'UserLoadFromDatabase' => [ 'deprecatedVersion' => '1.37' ],
'UserLoadOptions' => [ 'deprecatedVersion' => '1.37', 'silent' => true ],

View file

@ -326,7 +326,6 @@ class HookRunner implements
\MediaWiki\Hook\SkinTemplateNavigationHook,
\MediaWiki\Hook\SkinTemplateNavigation__SpecialPageHook,
\MediaWiki\Hook\SkinTemplateNavigation__UniversalHook,
\MediaWiki\Hook\SkinTemplateOutputPageBeforeExecHook,
\MediaWiki\Hook\SkinTemplateToolboxEndHook,
\MediaWiki\Hook\SoftwareInfoHook,
\MediaWiki\Hook\SpecialBlockModifyFormFieldsHook,
@ -3468,13 +3467,6 @@ class HookRunner implements
);
}
public function onSkinTemplateOutputPageBeforeExec( $sktemplate, $tpl ) {
return $this->container->run(
'SkinTemplateOutputPageBeforeExec',
[ $sktemplate, $tpl ]
);
}
public function onSkinTemplateToolboxEnd( $sk, $dummy ) {
return $this->container->run(
'SkinTemplateToolboxEnd',

View file

@ -1,31 +0,0 @@
<?php
namespace MediaWiki\Hook;
use QuickTemplate;
use SkinTemplate;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "SkinTemplateOutputPageBeforeExec" to register handlers implementing this interface.
*
* @deprecated since 1.35. See
* https://www.mediawiki.org/wiki/Manual:Hooks/SkinTemplateOutputPageBeforeExec
* for migration notes.
* @see https://phabricator.wikimedia.org/T60137 for details on the deprecation
*
* @ingroup Hooks
*/
interface SkinTemplateOutputPageBeforeExecHook {
/**
* This hook is called before SkinTemplate::outputPage() starts
* page output.
*
* @since 1.35
*
* @param SkinTemplate $sktemplate
* @param QuickTemplate $tpl QuickTemplate engine object
* @return bool|void True or no return value to continue or false to abort
*/
public function onSkinTemplateOutputPageBeforeExec( $sktemplate, $tpl );
}

View file

@ -414,12 +414,6 @@ class SkinTemplate extends Skin {
$tpl->set( 'debughtml', MWDebug::getHTMLDebugLog() );
$tpl->set( 'reporttime', wfReportTime( $out->getCSP()->getNonce() ) );
// original version by hansm
// See T60137 for information on deprecation.
if ( !$this->getHookRunner()->onSkinTemplateOutputPageBeforeExec( $this, $tpl ) ) {
wfDebug( __METHOD__ . ": Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!" );
}
// Set the bodytext to another key so that skins can just output it on its own
// and output printfooter and debughtml separately
$tpl->set( 'bodycontent', $tpl->data['bodytext'] );