Deprecate the ArticleEditUpdates hook

Change-Id: Ie85a46846315999ebaab1e1b38265937f4b2c79e
This commit is contained in:
James D. Forrester 2020-02-07 15:40:46 -08:00 committed by Krinkle
parent 6a7ab1ed04
commit cafe286e2b
3 changed files with 7 additions and 3 deletions

View file

@ -447,6 +447,8 @@ because of Phabricator reports.
- mTables
* The ArticleEditUpdatesDeleteFromRecentchanges hook has been deprecated. Please
use the RecentChange_save hook or similar instead.
* The ArticleEditUpdates hook has been deprecated. Please
use the RevisionDataUpdates hook or similar instead.
* …
=== Other changes in 1.35 ===

View file

@ -641,8 +641,8 @@ was changed.
&$wikiPage: WikiPage (object) of the user talk page
$recipient: User (object) who's talk page was edited
'ArticleEditUpdates': When edit updates (mainly link tracking) are made when an
article has been changed.
'ArticleEditUpdates': DEPRECATED since 1.35, use RevisionDataUpdates instead.
When edit updates (mainly link tracking) are made when an article has been changed.
&$wikiPage: the WikiPage (object)
&$editInfo: data holder that includes the parser output ($editInfo->output) for
that page after the change

View file

@ -1485,7 +1485,9 @@ class DerivedPageDataUpdater implements IDBAccessObject, LoggerAwareInterface {
// this hook whenever possible in order to avoid unnecessary additional parses.
$editInfo = $this->getPreparedEdit();
Hooks::run( 'ArticleEditUpdates',
[ &$wikiPage, &$editInfo, $this->options['changed'] ] );
[ &$wikiPage, &$editInfo, $this->options['changed'] ],
'1.35'
);
// TODO: replace legacy hook! Use a listener on PageEventEmitter instead!
if ( Hooks::run( 'ArticleEditUpdatesDeleteFromRecentchanges', [ &$wikiPage ], '1.35' ) ) {