As Special:Version then outputs it as "(Closure)" which is silly
Version: unspecified
Severity: trivial
As Special:Version then outputs it as "(Closure)" which is silly
Version: unspecified
Severity: trivial
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T47166 Outputting "Closure" under extension functions on Special:Version is useless | |||
Resolved | Krenair | T47167 Don't use a closure in $wgExtensionFunctions |
https://gerrit.wikimedia.org/r/#/c/50493/
I don't like the global function, but reintroducing the issue is not great either.
Isn't there some better approach here?
Maybe introduce a new usage?
$wgExtensionFunctions[] = array(
'func' => function() { /* ... */ }, 'name' => 'Some descriptive name',
);
I do not see how the feature we are trying to support here is useful at all. I have never any any use for it, and don't know of someone who did. Why display this random list of functions there? If it was one per extension, and it was the main entry point for these extensions, then I could see some use. This is however not the case. Many extensions don't have a handler for this hook, some have multiple handlers, and in our case, the handler we have is for some feature that is certainly not worth mentioning on Special:Version. If it was, we'd also want to list a lot of other things.
Change 71972 had a related patch set uploaded by Daniel Kinzler:
(bug 45167) use SetupAfterCache to register templates.
Change 71972 merged by jenkins-bot:
(bug 45167) use SetupAfterCache to register templates.
Change 71355 had a related patch set uploaded by Krinkle:
Remove list of functions added in wgExtensionFunctions
Change 71355 merged by jenkins-bot:
Remove list of functions added in wgExtensionFunctions