diff --git a/includes/PopupsHooks.php b/includes/PopupsHooks.php index d809e3d43..1e128302d 100644 --- a/includes/PopupsHooks.php +++ b/includes/PopupsHooks.php @@ -22,8 +22,9 @@ namespace Popups; use ExtensionRegistry; use MediaWiki\Config\Config; -use MediaWiki\Hook\BeforePageDisplayHook; -use MediaWiki\Hook\MakeGlobalVariablesScriptHook; +use MediaWiki\Context\IContextSource; +use MediaWiki\Output\Hook\BeforePageDisplayHook; +use MediaWiki\Output\Hook\MakeGlobalVariablesScriptHook; use MediaWiki\Output\OutputPage; use MediaWiki\Preferences\Hook\GetPreferencesHook; use MediaWiki\ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook; @@ -236,7 +237,7 @@ class PopupsHooks implements * user has enabled conflicting Reference Tooltips Gadget. * * @param array &$vars variables to be added into the output of OutputPage::headElement - * @param \IContextSource $out OutputPage instance calling the hook + * @param IContextSource $out OutputPage instance calling the hook */ public function onMakeGlobalVariablesScript( &$vars, $out ): void { $vars['wgPopupsFlags'] = $this->popupsContext->getConfigBitmaskFromUser( $out->getUser() ); diff --git a/tests/phpunit/PopupsGadgetsIntegrationTest.php b/tests/phpunit/PopupsGadgetsIntegrationTest.php index 1dd42e930..97428ee43 100644 --- a/tests/phpunit/PopupsGadgetsIntegrationTest.php +++ b/tests/phpunit/PopupsGadgetsIntegrationTest.php @@ -19,6 +19,7 @@ */ use MediaWiki\Config\Config; +use MediaWiki\Config\HashConfig; use MediaWiki\Extension\Gadgets\Gadget; use MediaWiki\Extension\Gadgets\GadgetRepo; use MediaWiki\User\User;