Page MenuHomePhabricator

Update setTemporaryHook() to use scopedRegister
Closed, ResolvedPublic

Description

With the introduction of the new HookContainer.php (to takeover the role of Hooks.php), a new scopedRegister() function has been added to assign temporary hooks.

We should update setTemporaryHook in MediaWikiIntegrationTestCase.php and MediaWikiUnitTestCase.php to use this new function instead of updating $wgHooks directly.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 15 2020, 5:16 PM

Change 589097 had a related patch set uploaded (by Nikki Nikkhoui; owner: Nikki Nikkhoui):
[mediawiki/core@master] Update setTemporaryHook() to use scopedRegister()

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

Change 595222 had a related patch set uploaded (by Nikki Nikkhoui; owner: Nikki Nikkhoui):
[mediawiki/extensions/CirrusSearch@master] Explicitly remove temporary hooks in FunctionScoreChainTest

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

Change 595222 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Explicitly remove temporary hooks in FunctionScoreChainTest

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

Change 589097 merged by jenkins-bot:
[mediawiki/core@master] Update setTemporaryHook() to use scopedRegister()

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

nnikkhoui closed this task as Resolved.May 11 2020, 3:25 PM
nnikkhoui triaged this task as Medium priority.