kulttuuri/DiscordNotifications

Use of PageContentInsertComplete hook was deprecated in MediaWiki 1.35.

Closed this issue · 2 comments

In the release notes,

Multiple hooks that include Revision objects were deprecated. The hooks, as
well as suitable replacements, are noted below:

  • PageContentInsertComplete (hard deprecated, use the PageSaveComplete hook)

I wonder how this goes, this states that it is hard deprecated. I wonder if this game plan works so that this extension works for old version of MediaWiki and also for new:

  1. Implement PageSaveComplete hook
  2. Just leave the old hook(s) there, MediaWiki will not call them anymore(?)
  1. Just leave the old hook(s) there, MediaWiki will not call them anymore(?)

Some version_compare( MW_VERSION, '1.35', '>=' ) condition checks could be used to prevent old hooks to be called; But just listing old hooks on extensions.json results in printing developer warnings. I will soon upload a PR that let different hooks be registered depending on the version. But mine will be a little dirty so you will try the former solution.