diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e93354..44a0667 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: experimental: false - mw: 'REL1_46' php: '8.4' - experimental: true + experimental: false - mw: 'master' php: '8.5' experimental: true diff --git a/extension.json b/extension.json index cdb377a..595eb0f 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "SimpleBatchUpload", - "version": "3.0.2", + "version": "3.0.3", "author": [ "[https://www.mediawiki.org/wiki/User:F.trott Stephan Gambke]", "[https://professional.wiki/ Professional Wiki]", diff --git a/release-notes.md b/release-notes.md index 589ba61..33b108a 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,5 +1,11 @@ ## Release Notes +### SimpleBatchUpload 3.0.3 + +Released on August 5, 2026. + +* Fixed deprecation warning shown on MediaWiki 1.46 + ### SimpleBatchUpload 3.0.2 Released on July 1, 2026. diff --git a/src/SpecialBatchUpload.php b/src/SpecialBatchUpload.php index be675d3..b5b1c26 100644 --- a/src/SpecialBatchUpload.php +++ b/src/SpecialBatchUpload.php @@ -33,13 +33,12 @@ */ class SpecialBatchUpload extends SpecialPage { - /** - * @param string $name Name of the special page, as seen in links and URLs - * @param string $restriction User right required, e.g. "block" or "delete" - * @param bool $listed Whether the page is listed in Special:Specialpages - */ - public function __construct( $name = '', $restriction = '', $listed = true ) { - parent::__construct( 'BatchUpload', 'upload', $listed ); + public function __construct() { + parent::__construct( 'BatchUpload' ); + } + + public function getRestriction(): string { + return 'upload'; } /** diff --git a/tests/phpunit/SpecialBatchUploadTest.php b/tests/phpunit/SpecialBatchUploadTest.php new file mode 100644 index 0000000..4b86826 --- /dev/null +++ b/tests/phpunit/SpecialBatchUploadTest.php @@ -0,0 +1,17 @@ +assertSame( 'upload', ( new SpecialBatchUpload() )->getRestriction() ); + } + +}