We should have structure tests that make sure all of the entries in $wgHooks and $wgExtensionFunctions are valid callbacks.
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| tests: Add structure test to verify hook and extension function callbacks | mediawiki/core | master | +61 -0 |
Event Timeline
So this is just a phpunit test that loops through the arrays, and asserts that each entry is callable?
Seems like it should be done in an hour...
The previous comments don't explain who or what (task?) exactly this task is stalled on ("If a report is waiting for further input (e.g. from its reporter or a third party) and can currently not be acted on"). Hence resetting task status.
(Smallprint, as general orientation for task management: If you wanted to express that nobody is currently working on this task, then the assignee should be removed and/or priority could be lowered instead. If work on this task is blocked by another task, then that other task should be added via Edit Related Tasks... → Edit Subtasks. If this task is stalled on an upstream project, then the Upstream tag should be added. If this task requires info from the task reporter, then there should be instructions which info is needed. If this task needs retesting, then the TestMe tag should be added. If this task is either out of scope and nobody should ever work on this, or nobody else managed to reproduce the problem described in this task, then this task should have the "Declined" status. If the task is valid but should not appear on some team's workboard, then the team project tag should be removed while the task has another active project tag.)
Hello, I would like to claim this task and start working on it.
I’m currently exploring the relevant codebase and understanding the issue. I’ll share updates as I make progress. Please let me know if there are any guidelines or suggestions I should follow before proceeding.
Thank you.
Change #1250602 had a related patch set uploaded (by Shreshth Srivastava; author: Shreshth Srivastava):
[mediawiki/core@master] tests: Add structure test to verify hook and extension function callbacks
I've submitted a patch for this.
Added a structure test (HookCallbackValidityTest) that loops through $wgHooks and $wgExtensionFunctions and verifies each entry is a valid callback. Took help from Claude for code review and implementation.