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 ExtensionRegistry;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
use ResourceLoader; use MediaWiki\ResourceLoader as RL;
use ResourceLoaderContext; use MediaWiki\ResourceLoader\ResourceLoader;
use ResourceLoaderFileModule;
/** /**
* ResourceLoader module for ext.CodeMirror * ResourceLoader module for ext.CodeMirror
*/ */
class ResourceLoaderCodeMirrorModule extends ResourceLoaderFileModule { class ResourceLoaderCodeMirrorModule extends RL\FileModule {
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function getScript( ResourceLoaderContext $context ) { public function getScript( RL\Context $context ) {
return ResourceLoader::makeConfigSetScript( return ResourceLoader::makeConfigSetScript(
[ 'extCodeMirrorConfig' => $this->getFrontendConfiguraton() ] [ 'extCodeMirrorConfig' => $this->getFrontendConfiguraton() ]
) )

View file

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