Wikimedia

Replace 2 or 3 deprecated hooks in 2 or 3 MediaWiki extensions (VI)

This task might be boring, but that's also part of a developer's job.

In MediaWiki core's ContentHandler "module", a lot of hooks+functions were deprecated in version 1.21 (1.21 is unsupported since 2014).

Some of these deprecated hooks are still used in code of MediaWiki extensions ("technical debt") and should be replaced. These extensions need cleaning up so that the deprecated hooks can finally be removed from MediaWiki core.

See the description of the linked Phabricator task for info about the deprecated hooks + their replacements. You want to take a look at the deprecated hook in the MediaWiki Core code repository + also its replacement. You have to look up the correct use of the replacement. (To get an idea, you can also check for code in MediaWiki Core that has already been replaced.)

Update the code in the following repositories + provide patches in Gerrit (each repository requires a separate patch):

  • mediawiki/extensions/MWSearch/MWSearchUpdateHook.php: $wgHooks['ArticleSaveComplete' ][]
  • mediawiki/extensions/PureWikiDeletion/PureWikiDeletion.php: $wgHooks['ArticleSaveComplete'][]
  • mediawiki/extensions/PureWikiDeletion/PureWikiDeletion.php: $wgHooks['ArticleSave'][]
  • mediawiki/extensions/DidYouMean/DidYouMean.php: $wgHooks['ArticleSaveComplete'][]

The commit message of your Gerrit patch(es) must have the line "Bug: T151973".

Task tags

  • php
  • technical debt

Students who completed this task

Yurii Shnitkovskyi

Task type

  • code Code
close

2016