diff --git a/composer.json b/composer.json index 2807546e..605b0a58 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "require-dev": { "mediawiki/mediawiki-codesniffer": "41.0.0", - "mediawiki/mediawiki-phan-config": "0.12.1", + "mediawiki/mediawiki-phan-config": "0.14.0", "mediawiki/minus-x": "1.1.1", "php-parallel-lint/php-console-highlighter": "1.0.0", "php-parallel-lint/php-parallel-lint": "1.3.2" diff --git a/includes/OptionManager.php b/includes/OptionManager.php index 5533b9e7..2ac8285f 100644 --- a/includes/OptionManager.php +++ b/includes/OptionManager.php @@ -24,8 +24,8 @@ namespace MediaWiki\Extension\CategoryTree; -use Exception; use FormatJson; +use InvalidArgumentException; use MediaWiki\Config\Config; use MediaWiki\MediaWikiServices; @@ -262,7 +262,6 @@ class OptionManager { * @param array $options * @param string $enc * @return mixed - * @throws Exception */ private static function encodeOptions( array $options, $enc ) { if ( $enc === 'mode' || $enc === '' ) { @@ -270,7 +269,7 @@ class OptionManager { } elseif ( $enc === 'json' ) { $opt = FormatJson::encode( $options ); } else { - throw new Exception( 'Unknown encoding for CategoryTree options: ' . $enc ); + throw new InvalidArgumentException( 'Unknown encoding for CategoryTree options: ' . $enc ); } return $opt; diff --git a/package-lock.json b/package-lock.json index 3c8d5951..3b0ebc02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "devDependencies": { "eslint-config-wikimedia": "0.26.0", "grunt": "1.6.1", - "grunt-banana-checker": "0.11.0", + "grunt-banana-checker": "0.11.1", "grunt-eslint": "24.3.0", "grunt-stylelint": "0.19.0", "stylelint-config-wikimedia": "0.16.1" @@ -2510,9 +2510,9 @@ } }, "node_modules/grunt-banana-checker": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/grunt-banana-checker/-/grunt-banana-checker-0.11.0.tgz", - "integrity": "sha512-qXtcxu7y9GFEIx6ELm5jSf+JqvCafdco+t/YsrUhUDNe9AgCnP7X0R+PxT0qZaDftKVrDrR2gPOYqpaAye5bDw==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/grunt-banana-checker/-/grunt-banana-checker-0.11.1.tgz", + "integrity": "sha512-CF0h/TXaX9sbF2yIz+fUfJc4Zvms7XGYQ7ZYMD5+vv0LMZzSFf7JSHXDaBEs72nQWw4r4ap5fOW3baAliW+0bQ==", "dev": true, "bin": { "banana-checker": "src/cli.js" @@ -7218,9 +7218,9 @@ } }, "grunt-banana-checker": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/grunt-banana-checker/-/grunt-banana-checker-0.11.0.tgz", - "integrity": "sha512-qXtcxu7y9GFEIx6ELm5jSf+JqvCafdco+t/YsrUhUDNe9AgCnP7X0R+PxT0qZaDftKVrDrR2gPOYqpaAye5bDw==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/grunt-banana-checker/-/grunt-banana-checker-0.11.1.tgz", + "integrity": "sha512-CF0h/TXaX9sbF2yIz+fUfJc4Zvms7XGYQ7ZYMD5+vv0LMZzSFf7JSHXDaBEs72nQWw4r4ap5fOW3baAliW+0bQ==", "dev": true }, "grunt-cli": { diff --git a/package.json b/package.json index 1b5f6227..bd9a5cb3 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "devDependencies": { "eslint-config-wikimedia": "0.26.0", "grunt": "1.6.1", - "grunt-banana-checker": "0.11.0", + "grunt-banana-checker": "0.11.1", "grunt-eslint": "24.3.0", "grunt-stylelint": "0.19.0", "stylelint-config-wikimedia": "0.16.1"