From 60e2f049420b6e1db87d287cb69a016a8a4eedf8 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 20 May 2022 12:11:31 +1000 Subject: [PATCH] Use new ResourceLoader namespace Extensions using Phan need to be updated simultaneously with core due to T308443. Bug: T308718 Depends-On: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659 Change-Id: I08d1a4122d1c8052d1cdfc6f8249abdaa80067a7 --- includes/Hooks.php | 8 ++++---- includes/ResourceLoaderEchoImageModule.php | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/includes/Hooks.php b/includes/Hooks.php index 649543c5c..46c9a6e3f 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -34,6 +34,8 @@ use MediaWiki\Logger\LoggerFactory; use MediaWiki\MediaWikiServices; use MediaWiki\Preferences\MultiTitleFilter; use MediaWiki\Preferences\MultiUsernameFilter; +use MediaWiki\ResourceLoader as RL; +use MediaWiki\ResourceLoader\ResourceLoader; use MediaWiki\Revision\RevisionRecord; use MediaWiki\Storage\EditResult; use MediaWiki\User\UserIdentity; @@ -42,8 +44,6 @@ use MWEchoNotifUser; use MWException; use OutputPage; use RecentChange; -use ResourceLoader; -use ResourceLoaderContext; use ResourceLoaderEchoImageModule; use Skin; use SkinTemplate; @@ -1604,14 +1604,14 @@ class Hooks implements RecentChange_saveHook { $messages[] = 'echo-notification-loginrequired'; } - public static function getConfigVars( ResourceLoaderContext $context, Config $config ) { + public static function getConfigVars( RL\Context $context, Config $config ) { return [ 'EchoMaxNotificationCount' => MWEchoNotifUser::MAX_BADGE_COUNT, 'EchoPollForUpdates' => $config->get( 'EchoPollForUpdates' ) ]; } - public static function getLoggerConfigVars( ResourceLoaderContext $context, Config $config ) { + public static function getLoggerConfigVars( RL\Context $context, Config $config ) { $schemas = $config->get( 'EchoEventLoggingSchemas' ); return [ 'EchoInteractionLogging' => $schemas['EchoInteraction']['enabled'] && diff --git a/includes/ResourceLoaderEchoImageModule.php b/includes/ResourceLoaderEchoImageModule.php index 5cb6f9557..69eceabd1 100644 --- a/includes/ResourceLoaderEchoImageModule.php +++ b/includes/ResourceLoaderEchoImageModule.php @@ -18,11 +18,13 @@ * @file */ +use MediaWiki\ResourceLoader as RL; + /** * A sibling of secret special sauce. - * @see ResourceLoaderOOUIImageModule for familial resemblence + * @see RL\OOUIImageModule for familial resemblence */ -class ResourceLoaderEchoImageModule extends ResourceLoaderImageModule { +class ResourceLoaderEchoImageModule extends RL\ImageModule { protected function loadFromDefinition() { if ( $this->definition === null ) { return;