Page MenuHomePhabricator

Refactor Hooks to no longer rely on global state and improve type safety
Closed, DuplicatePublic


Hook handlers are currently registered and triggered via global variables and static functions. To allow hook handlers to be injected, and be called in a typesafe way, some refactoring is required, see subtasks.

See also T171515: Hooks system should support MediaWiki services.

Event Timeline

I understand the global state issue, but not sure I understand the type safety issue... ie, would this aim towards allowing static analysis to confirm that hooks have the right signature? Or something more general?