Merge "Remove ParserGetVariableVarCacheHook, deprecated in 1.35"
This commit is contained in:
commit
a88926abba
6 changed files with 3 additions and 40 deletions
|
|
@ -394,6 +394,8 @@ because of Phabricator reports.
|
|||
* $wgCanonicalNamespaceNames no longer includes custom namespaces defined using
|
||||
$wgExtraNamespaces. Extensions should use the NamespaceInfo service instead
|
||||
of accessing this configuration setting directly.
|
||||
* The following hook, deprecated in 1.35, has been removed:
|
||||
- ParserGetVariableValueVarCache: ParserGetVariableValueVarCacheHook
|
||||
* These methods have been moved from IDatabase to IMaintainableDatabase:
|
||||
- IDatabase::fieldExists -> IMaintainableDatabase::fieldExists
|
||||
- IDatabase::indexExists -> IMaintainableDatabase::indexExists
|
||||
|
|
|
|||
|
|
@ -965,7 +965,6 @@ $wgAutoloadLocalClasses = [
|
|||
'MediaWiki\\Hook\\ParserFirstCallInitHook' => __DIR__ . '/includes/parser/Hook/ParserFirstCallInitHook.php',
|
||||
'MediaWiki\\Hook\\ParserGetVariableValueSwitchHook' => __DIR__ . '/includes/parser/Hook/ParserGetVariableValueSwitchHook.php',
|
||||
'MediaWiki\\Hook\\ParserGetVariableValueTsHook' => __DIR__ . '/includes/parser/Hook/ParserGetVariableValueTsHook.php',
|
||||
'MediaWiki\\Hook\\ParserGetVariableValueVarCacheHook' => __DIR__ . '/includes/parser/Hook/ParserGetVariableValueVarCacheHook.php',
|
||||
'MediaWiki\\Hook\\ParserLimitReportFormatHook' => __DIR__ . '/includes/parser/Hook/ParserLimitReportFormatHook.php',
|
||||
'MediaWiki\\Hook\\ParserLimitReportPrepareHook' => __DIR__ . '/includes/parser/Hook/ParserLimitReportPrepareHook.php',
|
||||
'MediaWiki\\Hook\\ParserLogLinterDataHook' => __DIR__ . '/includes/parser/Hook/ParserLogLinterDataHook.php',
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ class DeprecatedHooks {
|
|||
'LocalFile::getHistory' => [ 'deprecatedVersion' => '1.37' ],
|
||||
'MagicWordwgVariableIDs' => [ 'deprecatedVersion' => '1.35', 'silent' => true ],
|
||||
'PageContentSave' => [ 'deprecatedVersion' => '1.35', 'silent' => true ],
|
||||
'ParserGetVariableValueVarCache' => [ 'deprecatedVersion' => '1.35' ],
|
||||
'ParserSectionCreate' => [ 'deprecatedVersion' => '1.35' ],
|
||||
'ParserTestTables' => [ 'deprecatedVersion' => '1.36', 'silent' => true ],
|
||||
'PrefixSearchBackend' => [ 'deprecatedVersion' => '1.27', 'silent' => true ],
|
||||
|
|
|
|||
|
|
@ -287,7 +287,6 @@ class HookRunner implements
|
|||
\MediaWiki\Hook\ParserFirstCallInitHook,
|
||||
\MediaWiki\Hook\ParserGetVariableValueSwitchHook,
|
||||
\MediaWiki\Hook\ParserGetVariableValueTsHook,
|
||||
\MediaWiki\Hook\ParserGetVariableValueVarCacheHook,
|
||||
\MediaWiki\Hook\ParserLimitReportFormatHook,
|
||||
\MediaWiki\Hook\ParserLimitReportPrepareHook,
|
||||
\MediaWiki\Hook\ParserLogLinterDataHook,
|
||||
|
|
@ -2907,13 +2906,6 @@ class HookRunner implements
|
|||
);
|
||||
}
|
||||
|
||||
public function onParserGetVariableValueVarCache( $parser, &$varCache ) {
|
||||
return $this->container->run(
|
||||
'ParserGetVariableValueVarCache',
|
||||
[ $parser, &$varCache ]
|
||||
);
|
||||
}
|
||||
|
||||
public function onParserLimitReportFormat( $key, &$value, &$report, $isHTML,
|
||||
$localize
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace MediaWiki\Hook;
|
||||
|
||||
use Parser;
|
||||
|
||||
/**
|
||||
* This is a hook handler interface, see docs/Hooks.md.
|
||||
* Use the hook name "ParserGetVariableValueVarCache" to register handlers implementing this interface.
|
||||
*
|
||||
* @deprecated since 1.35
|
||||
* @ingroup Hooks
|
||||
*/
|
||||
interface ParserGetVariableValueVarCacheHook {
|
||||
/**
|
||||
* Use this hook to change the value of the variable
|
||||
* cache or return false to not use it.
|
||||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param Parser $parser
|
||||
* @param array &$varCache Variable cache
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
public function onParserGetVariableValueVarCache( $parser, &$varCache );
|
||||
}
|
||||
|
|
@ -2842,10 +2842,7 @@ class Parser {
|
|||
* Some of these require message or data lookups and can be
|
||||
* expensive to check many times.
|
||||
*/
|
||||
if (
|
||||
$this->hookRunner->onParserGetVariableValueVarCache( $this, $this->mVarCache ) &&
|
||||
isset( $this->mVarCache[$index] )
|
||||
) {
|
||||
if ( isset( $this->mVarCache[$index] ) ) {
|
||||
return $this->mVarCache[$index];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue