From d5ecaf0796d6b74eaa509ddb30c37c5804bb0e91 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sat, 6 May 2023 23:05:11 +0200 Subject: [PATCH] Replace deprecated Hooks::register Bug: T335536 Change-Id: Ia39bbc8a2f0853ae69f966b65ff47551f3af941d --- includes/Hooks.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/Hooks.php b/includes/Hooks.php index 1515a2e2..05a5ae5f 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -2,7 +2,6 @@ namespace MediaWiki\Extension\Interwiki; -use Hooks as MWHooks; use MediaWiki\MediaWikiServices; use MediaWiki\WikiMap\WikiMap; @@ -41,7 +40,7 @@ class Hooks { return; } // This will trigger a deprecation warning in MW 1.36+ - MWHooks::register( + MediaWikiServices::getInstance()->getHookContainer()->register( 'InterwikiLoadPrefix', 'MediaWiki\Extension\Interwiki\Hooks::onInterwikiLoadPrefix' ); }