Page MenuHomePhabricator

[WBQC] Update WikibaseQualityConstraints to use the new HookContainer/HookRunner system
Open, Needs TriagePublic

Description

Implement the Hook system added in MediaWiki 1.35 in the extensions, see Hooks.md for documentation.

  • Use hook handlers for core hooks
  • Use hook handlers for Wikibase hooks (T338452) - (this point is stalled, hook interface are not implement yet)

Event Timeline

Use hook handlers for Wikibase hooks (T338452) - (this point is stalled, hook interface are not implement yet)

That doesn’t block migrating the hook handlers from static methods to classes with ObjectFactory specs – the classes just don’t have an interface to implement yet.

Also, the task description of T338452 sounds like it’s only for migrating the hook handlers Wikibase registers (for hooks from core or other extensions), which IMHO is quite separate from how Wikibase fires its own hooks.

Change 962168 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/WikibaseQualityConstraints@master] Use HookHandlers for core hooks

https://gerrit.wikimedia.org/r/962168

Change 962168 merged by jenkins-bot:

[mediawiki/extensions/WikibaseQualityConstraints@master] Use HookHandlers for core hooks

https://gerrit.wikimedia.org/r/962168

Umherirrender updated the task description. (Show Details)

Use hook handlers for Wikibase hooks (T338452) - (this point is stalled, hook interface are not implement yet)

That doesn’t block migrating the hook handlers from static methods to classes with ObjectFactory specs – the classes just don’t have an interface to implement yet.

Also, the task description of T338452 sounds like it’s only for migrating the hook handlers Wikibase registers (for hooks from core or other extensions), which IMHO is quite separate from how Wikibase fires its own hooks.

Technically the hook interfaces are not needed to use HookHandlers as the called method is build up by the hook name and not by the interface name, but the interfaces providing good documentation about types and arguments. Applying this along with the conversion brings better quality by using static analyzers and avoids later work to add them, which could be missed because it already works as is.

The tasks about "new HookContainer/HookRunner" (including the Epic parent task T263353) are for both things of the new hook system, that includes the hook interfaces with the HookRunner to fire own hooks and to use the hook interfaces in the hook handlers by the called code.

ItamarWMDE renamed this task from Update WikibaseQualityConstraints to use the new HookContainer/HookRunner system to [WBQC] Update WikibaseQualityConstraints to use the new HookContainer/HookRunner system.Nov 8 2023, 10:54 AM