Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,10 @@ jobs:
strategy:
matrix:
include:
- mw: 'REL1_35'
php: '8.0'
experimental: false
- mw: 'REL1_39'
- mw: 'REL1_43'
php: '8.1'
experimental: false
- mw: 'REL1_40'
php: '8.2'
experimental: false
- mw: 'REL1_41'
php: '8.2'
experimental: false
- mw: 'REL1_42'
- mw: 'REL1_43'
php: '8.2'
experimental: false
- mw: 'REL1_43'
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
"homepage": "https://www.mediawiki.org/wiki/Extension:SimpleBatchUpload",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Professional Wiki",
"email": "[email protected]",
"homepage": "https://Professional.Wiki"
},
{
"name": "Stephan Gambke",
"email": "[email protected]",
Expand Down
6 changes: 3 additions & 3 deletions extension.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "SimpleBatchUpload",
"version": "2.0.1",
"version": "3.0.0",
"author": [
"[https://www.mediawiki.org/wiki/User:F.trott Stephan Gambke]",
"[https://professional.wiki/ Professional.Wiki]",
"[https://professional.wiki/ Professional Wiki]",
"..."
],
"url": "https://www.mediawiki.org/wiki/Extension:SimpleBatchUpload",
Expand All @@ -12,7 +12,7 @@
"license-name": "GPL-2.0-or-later",
"type": "specialpage",
"requires": {
"MediaWiki": ">=1.35"
"MediaWiki": ">=1.43"
},
"MessagesDirs": {
"SimpleBatchUpload": [
Expand Down
5 changes: 5 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Release Notes

### SimpleBatchUpload 3.0.0

* Raised minimum MediaWiki version to 1.43
* Added support for MediaWiki 1.44

### SimpleBatchUpload 2.0.1

Released on December 7, 2023.
Expand Down
2 changes: 1 addition & 1 deletion src/ParameterProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace MediaWiki\Extension\SimpleBatchUpload;

use Message;
use MediaWiki\Message\Message;

/**
* Class ParameterProvider
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleBatchUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace MediaWiki\Extension\SimpleBatchUpload;

use MediaWiki\MediaWikiServices;
use Parser;
use MediaWiki\Parser\Parser;

/**
* Class ExtensionManager
Expand Down
2 changes: 1 addition & 1 deletion src/SpecialBatchUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace MediaWiki\Extension\SimpleBatchUpload;

use SpecialPage;
use MediaWiki\SpecialPage\SpecialPage;

/**
* Class SpecialBatchUpload
Expand Down
6 changes: 3 additions & 3 deletions src/UploadButtonRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
*/

namespace MediaWiki\Extension\SimpleBatchUpload;
use Parser;
use PPFrame;
use Html;
use MediaWiki\Html\Html;
use MediaWiki\Parser\Parser;
use MediaWiki\Parser\PPFrame;

Comment on lines +26 to 29
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Import Message to drop the fragile global fallback

Html, Parser, and PPFrame are now fully-qualified, but the class still falls back on the root-namespace \Message further down (lines 93 & 100). Adding a namespaced import keeps style consistent and future-proofs the code against a potential alias removal.

 use MediaWiki\Html\Html;
 use MediaWiki\Parser\Parser;
 use MediaWiki\Parser\PPFrame;
+use MediaWiki\Message\Message;

Outside this hunk, replace \Message::newFromKey with Message::newFromKey.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
use MediaWiki\Html\Html;
use MediaWiki\Parser\Parser;
use MediaWiki\Parser\PPFrame;
use MediaWiki\Html\Html;
use MediaWiki\Parser\Parser;
use MediaWiki\Parser\PPFrame;
use MediaWiki\Message\Message;
🤖 Prompt for AI Agents
In src/UploadButtonRenderer.php around lines 26 to 29, add an import statement
for the Message class to avoid using the fragile global fallback. Then, outside
this hunk, replace all occurrences of \Message::newFromKey with
Message::newFromKey to maintain consistent namespacing and prevent potential
issues if the global alias is removed.

/**
* Class UploadButtonRenderer
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/SimpleBatchUploadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

namespace MediaWiki\Extension\SimpleBatchUpload\Tests;

use OutputPage;
use Parser;
use MediaWiki\Output\OutputPage;
use MediaWiki\Parser\Parser;
use MediaWiki\Extension\SimpleBatchUpload\SimpleBatchUpload;

/**
Expand Down