Use new ResourceLoader namespace

Extensions using Phan need to be updated simultaneously with core due
to T308443.

Bug: T308718
Depends-On: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
Change-Id: I47dad71df97f38c55550f71baf6dae67dbe0a2ba
This commit is contained in:
Tim Starling 2022-05-20 12:11:31 +10:00
parent 1310fbf645
commit 3a0c4b1f3e
2 changed files with 6 additions and 7 deletions

View file

@ -24,18 +24,17 @@ namespace MediaWiki\Extension\CodeMirror;
use ExtensionRegistry;
use MediaWiki\MediaWikiServices;
use ResourceLoader;
use ResourceLoaderContext;
use ResourceLoaderFileModule;
use MediaWiki\ResourceLoader as RL;
use MediaWiki\ResourceLoader\ResourceLoader;
/**
* ResourceLoader module for ext.CodeMirror
*/
class ResourceLoaderCodeMirrorModule extends ResourceLoaderFileModule {
class ResourceLoaderCodeMirrorModule extends RL\FileModule {
/**
* @inheritDoc
*/
public function getScript( ResourceLoaderContext $context ) {
public function getScript( RL\Context $context ) {
return ResourceLoader::makeConfigSetScript(
[ 'extCodeMirrorConfig' => $this->getFrontendConfiguraton() ]
)

View file

@ -3,7 +3,7 @@
namespace MediaWiki\Extension\CodeMirror\Tests;
use MediaWiki\Extension\CodeMirror\ResourceLoaderCodeMirrorModule;
use ResourceLoaderContext;
use MediaWiki\ResourceLoader\Context;
/**
* @covers \MediaWiki\Extension\CodeMirror\ResourceLoaderCodeMirrorModule
@ -11,7 +11,7 @@ use ResourceLoaderContext;
class ResourceLoaderCodeMirrorModuleTest extends \MediaWikiIntegrationTestCase {
public function testResourceLoaderModule() {
$context = $this->createMock( ResourceLoaderContext::class );
$context = $this->createMock( Context::class );
$module = new ResourceLoaderCodeMirrorModule();
$this->assertFalse( $module->supportsURLLoading() );