Skip to content

Commit

Permalink
Replace deprecated onResourceLoaderTestModules
Browse files Browse the repository at this point in the history
Fixes #669
  • Loading branch information
JeroenDeDauw committed Dec 14, 2021
1 parent c4b38f8 commit c89f3d8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
11 changes: 11 additions & 0 deletions extension.json
Expand Up @@ -331,6 +331,17 @@
}
},

"QUnitTestModule": {
"localBasePath": "tests/js/",
"remoteExtPath": "Maps/tests/js/",
"scripts": [
"leaflet/GeoJsonTest.js"
],
"dependencies": [
"ext.maps.leaflet.geojson"
]
},

"load_composer_autoloader": true,
"manifest_version": 2
}
1 change: 0 additions & 1 deletion psalm-baseline.xml
Expand Up @@ -793,7 +793,6 @@
<code>onBeforeDisplayNoArticleText</code>
<code>onChangeTagsAllowedAdd</code>
<code>onRegisterTags</code>
<code>onResourceLoaderTestModules</code>
<code>onShowMissingArticle</code>
<code>onSkinTemplateNavigation</code>
</MissingReturnType>
Expand Down
13 changes: 0 additions & 13 deletions src/MapsHooks.php
Expand Up @@ -115,19 +115,6 @@ public static function onChangeTagsAllowedAdd( array &$allowedTags, array $tags,
$allowedTags[] = 'maps-visual-edit';
}

public static function onResourceLoaderTestModules( array &$modules, $resourceLoader ) {
$modules['qunit']['ext.maps.test'] = [
'scripts' => [
'tests/js/leaflet/GeoJsonTest.js',
],
'dependencies' => [
'ext.maps.leaflet.geojson',
],
'localBasePath' => __DIR__ . '/..',
'remoteExtPath' => 'Maps'
];
}

/**
* Set the default format to 'map' when the requested properties are
* of type geographic coordinates.
Expand Down
1 change: 0 additions & 1 deletion src/MapsSetup.php
Expand Up @@ -118,7 +118,6 @@ private function registerHooks() {
$this->mwGlobals['wgHooks']['ListDefinedTags'][] = 'Maps\MapsHooks::onRegisterTags';
$this->mwGlobals['wgHooks']['ChangeTagsListActive'][] = 'Maps\MapsHooks::onRegisterTags';
$this->mwGlobals['wgHooks']['ChangeTagsAllowedAdd'][] = 'Maps\MapsHooks::onChangeTagsAllowedAdd';
$this->mwGlobals['wgHooks']['ResourceLoaderTestModules'][] = 'Maps\MapsHooks::onResourceLoaderTestModules';

$this->mwGlobals['wgHooks']['CargoSetFormatClasses'][] = function( array &$formatClasses ) {
$formatClasses['map'] = CargoFormat::class;
Expand Down

0 comments on commit c89f3d8

Please sign in to comment.