Remove deprecated hook 'SecondaryDataUpdate'.

Bug: T232878
Change-Id: I4a795436e560a19c8918177edeb3c792eeb9dd72
This commit is contained in:
Roman Stolar 2021-07-19 15:51:06 +03:00 committed by Petr Pchelko
parent bc76602493
commit a9e35df62a
5 changed files with 1 additions and 47 deletions

View file

@ -345,6 +345,7 @@ because of Phabricator reports.
All extensions that extend this class or use this method were updated to be
ready to the new behavior.
* ResultWrapper is now abstract. It cannot be directly constructed (T286694).
* The SecondaryDataUpdates hook, deprecated in 1.32, was removed entirely.
* …
=== Deprecations in 1.37 ===

View file

@ -52,7 +52,6 @@ class DeprecatedHooks {
'ProtectionForm::buildForm' => [ 'deprecatedVersion' => '1.36', 'silent' => true ],
'ResourceLoaderTestModules' => [ 'deprecatedVersion' => '1.33' ],
'RollbackComplete' => [ 'deprecatedVersion' => '1.36', 'silent' => true ],
'SecondaryDataUpdates' => [ 'deprecatedVersion' => '1.32', 'silent' => true ],
'SpecialMuteSubmit' => [ 'deprecatedVersion' => '1.35', 'silent' => true ],
'SkinTemplateOutputPageBeforeExec' => [ 'deprecatedVersion' => '1.35' ],
'SkinTemplateToolboxEnd' => [ 'deprecatedVersion' => '1.35' ],

View file

@ -66,7 +66,6 @@ class HookRunner implements
\MediaWiki\Content\Hook\PageContentLanguageHook,
\MediaWiki\Content\Hook\PlaceNewSectionHook,
\MediaWiki\Content\Hook\SearchDataForIndexHook,
\MediaWiki\Content\Hook\SecondaryDataUpdatesHook,
\MediaWiki\Diff\Hook\AbortDiffCacheHook,
\MediaWiki\Diff\Hook\ArticleContentOnDiffHook,
\MediaWiki\Diff\Hook\DifferenceEngineAfterLoadNewTextHook,
@ -3260,15 +3259,6 @@ class HookRunner implements
);
}
public function onSecondaryDataUpdates( $title, $oldContent, $recursive,
$parserOutput, &$updates
) {
return $this->container->run(
'SecondaryDataUpdates',
[ $title, $oldContent, $recursive, $parserOutput, &$updates ]
);
}
public function onSecuritySensitiveOperationStatus( &$status, $operation,
$session, $timeSinceAuth
) {

View file

@ -297,8 +297,6 @@ abstract class AbstractContent implements Content {
new LinksUpdate( $title, $parserOutput, $recursive )
];
Hooks::runner()->onSecondaryDataUpdates( $title, $old, $recursive, $parserOutput, $updates );
return $updates;
}

View file

@ -1,34 +0,0 @@
<?php
namespace MediaWiki\Content\Hook;
use Content;
use DataUpdate;
use ParserOutput;
use Title;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "SecondaryDataUpdates" to register handlers implementing this interface.
*
* @deprecated since 1.32 Use RevisionDataUpdates or override
* ContentHandler::getSecondaryDataUpdates instead.
* @ingroup Hooks
*/
interface SecondaryDataUpdatesHook {
/**
* Use this hook to modify the list of DataUpdates to perform when page content is modified.
*
* @param Title $title Title of the page that is being edited
* @param Content $oldContent Page content before the edit
* @param bool $recursive Whether DataUpdates should trigger recursive updates
* (relevant mostly for LinksUpdate)
* @param ParserOutput $parserOutput Rendered version of the page after the edit
* @param DataUpdate[] &$updates List of DataUpdate objects, to be modified or replaced by
* the hook handler
* @return bool|void True or no return value to continue or false to abort
*/
public function onSecondaryDataUpdates( $title, $oldContent, $recursive,
$parserOutput, &$updates
);
}