Skip to content

Add MW 44 support and drop support for MW below 43#76

Open
JeroenDeDauw wants to merge 2 commits into
masterfrom
mw44
Open

Add MW 44 support and drop support for MW below 43#76
JeroenDeDauw wants to merge 2 commits into
masterfrom
mw44

Conversation

@JeroenDeDauw

@JeroenDeDauw JeroenDeDauw commented Jul 3, 2025

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Expanded automated testing to include the latest MediaWiki REL1_44 with PHP 8.4.
    • Improved codebase consistency by updating class references to fully qualified namespaces.
    • Updated extension version to 4.0.0 with raised minimum MediaWiki version requirement to 1.43.
    • Revised documentation to reflect new platform requirements and added release notes for version 4.0.0.

@coderabbitai

coderabbitai Bot commented Jul 3, 2025

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The CI workflow was updated to include MediaWiki version REL1_44 with PHP 8.4 in the PHPUnit test matrix. Multiple import statements in source and test files were changed to use fully qualified namespaces for classes such as Parser, Html, Title, User, ContentHandler, and ParserOutput. No logic or functionality was altered.

Changes

Files/Groups Change Summary
.github/workflows/ci.yml Added MediaWiki REL1_44 with PHP 8.4 to the PHPUnit test matrix; removed older REL1_39 to REL1_42 entries with PHP 8.1 and 8.2.
src/Adapters/EmbedPresenter/CategoryUsageTracker.php, src/EntryPoints/BitbucketFunction.php, src/EntryPoints/EmbedFunction.php, src/EntryPoints/MediaWikiHooks.php, src/Adapters/EmbedResourceLoader/ParserFunctionEmbedResourceLoader.php Changed imports to fully qualified namespaces for Parser, ContentHandler, and ParserOutput.
src/Adapters/EmbedPresenter/ParserFunctionEmbedPresenter.php, src/Domain/ContentRenderer/CodeRenderer.php Changed import of Html to MediaWiki\Html\Html; removed trailing whitespace in CodeRenderer.
tests/Integration/EmbedFunctionSystemTest.php, tests/TestEnvironment.php, tests/Integration/EmbedFunctionIntegrationTest.php Changed imports of Title and User to fully qualified namespaces MediaWiki\Title\Title and MediaWiki\User\User; replaced global \Title usage with imported Title.
README.md, extension.json Updated minimum MediaWiki version requirement from 1.39 to 1.43; bumped extension version to 4.0.0; updated PHP and MediaWiki version requirements and release notes in README.

Possibly related PRs

  • Fix tests and CI #65: Previously expanded the CI matrix to include additional MediaWiki versions and updated related CI configurations, similar to this PR's focus on CI matrix updates.
✨ 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.

@JeroenDeDauw JeroenDeDauw changed the title Test also with MW 44 Add MW 44 support and drop support for MW below 43 Jul 3, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
README.md (2)

100-105: Unordered-list style is inconsistent → triggers MD004

The project uses - for lists earlier in the document (e.g. L15-19), while these new items switch to *.
Pick one style and stick to it:

-* [PHP] 8.0 or later (tested up to 8.4)
-* [MediaWiki] 1.43 or later (tested up to 1.44 and master)
+- [PHP] 8.0 or later (tested up to 8.4)
+- [MediaWiki] 1.43 or later (tested up to 1.44 and master)

(or convert the earlier dashes to asterisks).
This clears the MD004 warnings and keeps the README tidy.


249-255: Release-notes list style mismatch

The bullet list here repeats the * vs - inconsistency flagged above.
Update for uniform style to keep markdown-lint happy:

-* Raised minimum MediaWiki version from 1.39 to 1.43
-* Added support for MediaWiki 1.44
-* Fixed compatibility issue with the Network extension
-* Translation updates
+- Raised minimum MediaWiki version from 1.39 to 1.43
+- Added support for MediaWiki 1.44
+- Fixed compatibility issue with the Network extension
+- Translation updates
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e3b99d1 and 26cce25.

📒 Files selected for processing (13)
  • .github/workflows/ci.yml (1 hunks)
  • README.md (2 hunks)
  • extension.json (2 hunks)
  • src/Adapters/EmbedPresenter/CategoryUsageTracker.php (1 hunks)
  • src/Adapters/EmbedPresenter/ParserFunctionEmbedPresenter.php (1 hunks)
  • src/Adapters/EmbedResourceLoader/ParserFunctionEmbedResourceLoader.php (1 hunks)
  • src/Domain/ContentRenderer/CodeRenderer.php (2 hunks)
  • src/EntryPoints/BitbucketFunction.php (1 hunks)
  • src/EntryPoints/EmbedFunction.php (1 hunks)
  • src/EntryPoints/MediaWikiHooks.php (1 hunks)
  • tests/Integration/EmbedFunctionIntegrationTest.php (2 hunks)
  • tests/Integration/EmbedFunctionSystemTest.php (1 hunks)
  • tests/TestEnvironment.php (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • extension.json
  • src/Domain/ContentRenderer/CodeRenderer.php
  • src/Adapters/EmbedResourceLoader/ParserFunctionEmbedResourceLoader.php
  • src/EntryPoints/MediaWikiHooks.php
🚧 Files skipped from review as they are similar to previous changes (6)
  • tests/Integration/EmbedFunctionSystemTest.php
  • tests/TestEnvironment.php
  • src/Adapters/EmbedPresenter/CategoryUsageTracker.php
  • src/Adapters/EmbedPresenter/ParserFunctionEmbedPresenter.php
  • tests/Integration/EmbedFunctionIntegrationTest.php
  • .github/workflows/ci.yml
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md

102-102: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


103-103: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


251-251: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


252-252: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


253-253: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


254-254: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)

🔇 Additional comments (3)
README.md (1)

113-113: Ensure the new Composer constraint is actually available

professional-wiki/external-content:~4.0 assumes a 4.0.0 tag is on Packagist/Git.
Double-check that the tag will be pushed before merging, and that extension.json already advertises 4.0.0 (looks correct).
Otherwise users following the README will get a version-resolution error.

src/EntryPoints/BitbucketFunction.php (1)

7-7: LGTM! Namespace clarification for MediaWiki 1.44 compatibility.

The import statement update from use Parser; to use MediaWiki\Parser\Parser; is a proper namespace clarification that aligns with MediaWiki 1.44's class organization. This change maintains functionality while ensuring compatibility with the newer MediaWiki version.

src/EntryPoints/EmbedFunction.php (1)

7-7: LGTM! Consistent namespace clarification across the codebase.

The import statement update matches the change in BitbucketFunction.php, ensuring consistent use of the fully qualified MediaWiki\Parser\Parser namespace. This maintains consistency across the codebase while supporting MediaWiki 1.44 compatibility.

@JeroenDeDauw

Copy link
Copy Markdown
Member Author

Parser tests need fixing due to different output on MW 43 and MW 44. Perhaps we just run them on 44+?

@alistair3149

Copy link
Copy Markdown
Member

Parser tests need fixing due to different output on MW 43 and MW 44. Perhaps we just run them on 44+?

It is caused by HTML change from Codex message box. We can just create a separate parser test for 1.44+ to cover that.

@JeroenDeDauw

Copy link
Copy Markdown
Member Author

@alistair3149 can you fix this? Easiest approach is fine, as long as it runs on MW 44 and above. Skipping 43 is acceptable

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.

2 participants