Skip to content

Conversation

@JeroenDeDauw
Copy link
Member

@JeroenDeDauw JeroenDeDauw commented Jul 20, 2025

Fixes #68

Summary by CodeRabbit

  • New Features

    • Added support for MediaWiki 1.44.
    • Updated extension metadata and release notes for version 3.0.0.
    • Added "Professional Wiki" as an author in the project metadata.
  • Breaking Changes

    • Increased the minimum required MediaWiki version to 1.43.
  • Chores

    • Updated test matrix to focus on newer MediaWiki and PHP versions.
    • Improved namespace clarity in import statements throughout the codebase.

@coderabbitai
Copy link

coderabbitai bot commented Jul 20, 2025

📝 Walkthrough

Walkthrough

This update removes support for older MediaWiki versions, raising the minimum required version to 1.43 in both code and CI workflow. Namespace imports for several MediaWiki classes are made fully qualified throughout the codebase. Extension metadata and release notes are updated, and a new author is added to composer.json.

Changes

Files/Paths Change Summary
.github/workflows/ci.yml Removed older MediaWiki versions from PHPUnit matrix; now tests only REL1_43+ and updated PHP combinations.
composer.json Added "Professional Wiki" as a new author entry.
extension.json, release-notes.md Raised minimum MediaWiki version to 1.43, updated author name, bumped metadata version, updated release notes.
src/ParameterProvider.php, src/SimpleBatchUpload.php, Updated imports to use fully qualified MediaWiki class namespaces.
src/SpecialBatchUpload.php, src/UploadButtonRenderer.php,
tests/phpunit/SimpleBatchUploadTest.php

Possibly related PRs

  • Update CI #62: Also modifies the CI workflow matrix for MediaWiki versions, but with differing version sets and additional features, indicating related changes to CI configuration.
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
.github/workflows/ci.yml (1)

15-20: Consider testing the declared minimum PHP version

The extension advertises >=8.0, yet the matrix now starts at 8.1. If 8.0 remains an officially supported floor, keeping one 8.0 job (even allowed to fail) safeguards against unnoticed regressions.

src/SimpleBatchUpload.php (1)

36-36: Update the docblock type hint to match the new namespace import.

The docblock still uses the old \Parser type hint while the import now uses MediaWiki\Parser\Parser. Update for consistency.

-	 * @param \Parser $parser
+	 * @param Parser $parser
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c5ed9b and 29716b3.

📒 Files selected for processing (9)
  • .github/workflows/ci.yml (1 hunks)
  • composer.json (1 hunks)
  • extension.json (2 hunks)
  • release-notes.md (1 hunks)
  • src/ParameterProvider.php (1 hunks)
  • src/SimpleBatchUpload.php (1 hunks)
  • src/SpecialBatchUpload.php (1 hunks)
  • src/UploadButtonRenderer.php (1 hunks)
  • tests/phpunit/SimpleBatchUploadTest.php (1 hunks)
🔇 Additional comments (9)
src/SpecialBatchUpload.php (1)

27-27: Namespace import looks good

The switch to MediaWiki\SpecialPage\SpecialPage is correct and aligns the file with MW-core namespacing.

composer.json (1)

13-17: Author entry added correctly

Metadata remains valid JSON and the new organisation details are well-formed.

src/ParameterProvider.php (1)

27-27: Consistent Message namespacing

Importing MediaWiki\Message\Message removes reliance on the root-namespace alias—nice.

src/SimpleBatchUpload.php (1)

26-26: LGTM! Namespace import updated correctly.

The import statement has been properly updated to use the fully qualified MediaWiki\Parser\Parser namespace, which aligns with MediaWiki 1.43+ requirements.

extension.json (3)

3-3: LGTM! Version bump to 3.0.0 is appropriate.

The major version bump correctly reflects the breaking change of dropping support for MediaWiki versions below 1.43.


6-6: LGTM! Author name correction.

The removal of the dot from "Professional.Wiki" to "Professional Wiki" improves consistency.


15-15: LGTM! MediaWiki version requirement correctly updated.

The minimum MediaWiki version has been properly raised to 1.43, which aligns with the PR objectives to add MediaWiki 1.44 support and drop older versions.

release-notes.md (1)

3-7: LGTM! Release notes accurately document the changes.

The new release notes section for version 3.0.0 correctly documents both the raised minimum MediaWiki version to 1.43 and the added support for MediaWiki 1.44, which aligns perfectly with the PR objectives and extension.json changes.

tests/phpunit/SimpleBatchUploadTest.php (1)

25-26: LGTM! Namespace imports updated correctly.

Both OutputPage and Parser imports have been properly updated to use fully qualified MediaWiki namespaces (MediaWiki\Output\OutputPage and MediaWiki\Parser\Parser), which is consistent with the changes throughout the codebase for MediaWiki 1.43+ compatibility.

Comment on lines +26 to 29
use MediaWiki\Html\Html;
use MediaWiki\Parser\Parser;
use MediaWiki\Parser\PPFrame;

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.

@alistair3149 alistair3149 merged commit 802203d into master Jul 20, 2025
10 checks passed
@alistair3149 alistair3149 deleted the mw44 branch July 20, 2025 23:44
@coderabbitai coderabbitai bot mentioned this pull request Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not compatible with MW 1.44

3 participants