diff --git a/extension.json b/extension.json index f47ca13c6..fe67eb12a 100644 --- a/extension.json +++ b/extension.json @@ -13,7 +13,7 @@ "license-name": "GPL-2.0-or-later", "type": "parserhook", "requires": { - "MediaWiki": ">= 1.36.0" + "MediaWiki": ">= 1.39.0" }, "AutoloadNamespaces": { "MediaWiki\\Extension\\Math\\": "src/" diff --git a/src/MathChemSymbolsDataModule.php b/src/MathChemSymbolsDataModule.php index ccc836373..41ef30837 100644 --- a/src/MathChemSymbolsDataModule.php +++ b/src/MathChemSymbolsDataModule.php @@ -2,8 +2,7 @@ namespace MediaWiki\Extension\Math; -use ResourceLoaderContext; -use ResourceLoaderModule; +use MediaWiki\ResourceLoader as RL; /** * Resource loader module providing extra data from the server to Chem. @@ -11,18 +10,18 @@ use ResourceLoaderModule; * @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt * @license MIT */ -class MathChemSymbolsDataModule extends ResourceLoaderModule { +class MathChemSymbolsDataModule extends RL\Module { /** @inheritDoc */ protected $targets = [ 'desktop', 'mobile' ]; - public function getScript( ResourceLoaderContext $context ) { + public function getScript( RL\Context $context ) { return 've.ui.MWChemDialog.static.setSymbols(' . file_get_contents( __DIR__ . '/../modules/ve-math/chemSymbols.json' ) . ');'; } - public function getDependencies( ResourceLoaderContext $context = null ) { + public function getDependencies( RL\Context $context = null ) { return [ 'ext.math.visualEditor', ]; diff --git a/src/MathMathSymbolsDataModule.php b/src/MathMathSymbolsDataModule.php index dbfbfbeed..60a2558b9 100644 --- a/src/MathMathSymbolsDataModule.php +++ b/src/MathMathSymbolsDataModule.php @@ -2,8 +2,7 @@ namespace MediaWiki\Extension\Math; -use ResourceLoaderContext; -use ResourceLoaderModule; +use MediaWiki\ResourceLoader as RL; /** * Resource loader module providing extra data from the server to Math. @@ -11,18 +10,18 @@ use ResourceLoaderModule; * @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt * @license MIT */ -class MathMathSymbolsDataModule extends ResourceLoaderModule { +class MathMathSymbolsDataModule extends RL\Module { /** @inheritDoc */ protected $targets = [ 'desktop', 'mobile' ]; - public function getScript( ResourceLoaderContext $context ) { + public function getScript( RL\Context $context ) { return 've.ui.MWMathDialog.static.setSymbols(' . file_get_contents( __DIR__ . '/../modules/ve-math/mathSymbols.json' ) . ');'; } - public function getDependencies( ResourceLoaderContext $context = null ) { + public function getDependencies( RL\Context $context = null ) { return [ 'ext.math.visualEditor', ];