Skip to content

Fix usage of non-namespaced Html class alias - #826

Merged
JeroenDeDauw merged 1 commit into
ProfessionalWiki:masterfrom
SomeMWDev:fix-class-alias
Sep 27, 2025
Merged

Fix usage of non-namespaced Html class alias#826
JeroenDeDauw merged 1 commit into
ProfessionalWiki:masterfrom
SomeMWDev:fix-class-alias

Conversation

@SomeMWDev

@SomeMWDev SomeMWDev commented Sep 27, 2025

Copy link
Copy Markdown
Contributor

Fixes compatibility with MW 1.44.

Summary by CodeRabbit

  • New Features
    • No user-facing features added in this release.
  • Refactor
    • Standardized HTML rendering via the canonical utility to improve consistency and maintainability. This aligns with platform conventions and reduces technical debt.
  • Chores
    • Minor code cleanup for readability and future compatibility.
  • Impact
    • No changes to UI, behavior, or workflows are expected. This update is purely internal and should be transparent to end users.

Fixes compatibility with MW 1.44.
@coderabbitai

coderabbitai Bot commented Sep 27, 2025

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Replaced a namespaced static call to MediaWiki\Html\Html::element by adding an explicit import and updating the reference in src/GeoJsonPages/GeoJsonNewPageUi.php.

Changes

Cohort / File(s) Summary of Changes
Namespace import and call update
src/GeoJsonPages/GeoJsonNewPageUi.php
Added use MediaWiki\Html\Html;. Updated _Html::element to Html::element.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly identifies that the pull request corrects the use of a non-namespaced Html class alias, directly matching the primary code change of importing and using MediaWiki\Html\Html in place of the legacy alias, and is clear and specific without unnecessary detail.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f3df101 and b0f297d.

📒 Files selected for processing (1)
  • src/GeoJsonPages/GeoJsonNewPageUi.php (2 hunks)
🔇 Additional comments (1)
src/GeoJsonPages/GeoJsonNewPageUi.php (1)

8-22: Alignment with namespaced Html class looks good

Nice catch importing MediaWiki\Html\Html and updating the call site—this keeps the UI builder compatible with MW 1.44 now that _Html is gone.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@SomeMWDev

Copy link
Copy Markdown
Contributor Author

The CI failures seem unrelated.

@JeroenDeDauw
JeroenDeDauw merged commit bdbbabc into ProfessionalWiki:master Sep 27, 2025
5 of 8 checks passed
@doriangurazdowski0-prog

Copy link
Copy Markdown

4urrru34

@doriangurazdowski0-prog

Copy link
Copy Markdown

Maps\MapsFactory::newSemanticGeoJsonStore(): Argument #2 ($subjectPage) must be of type MediaWiki\Title\Title, MediaWiki\Page\PageIdentityValue given, called in /srv/mediawiki/1.44/extensions/Maps/src/GeoJsonPages/GeoJsonContentHandler.php on line 51

from /srv/mediawiki/1.44/extensions/Maps/src/MapsFactory.php(238)
#0 /srv/mediawiki/1.44/extensions/Maps/src/GeoJsonPages/GeoJsonContentHandler.php(51): Maps\MapsFactory->newSemanticGeoJsonStore(MediaWiki\Parser\ParserOutput, MediaWiki\Page\PageIdentityValue)
#1 /srv/mediawiki/1.44/includes/content/ContentHandler.php(1692): Maps\GeoJsonPages\GeoJsonContentHandler->fillParserOutput(Maps\GeoJsonPages\GeoJsonContent, MediaWiki\Content\Renderer\ContentParseParams, MediaWiki\Parser\ParserOutput)
#2 /srv/mediawiki/1.44/includes/content/Renderer/ContentRenderer.php(75): MediaWiki\Content\ContentHandler->getParserOutput(Maps\GeoJsonPages\GeoJsonContent, MediaWiki\Content\Renderer\ContentParseParams)
#3 /srv/mediawiki/1.44/includes/Revision/RenderedRevision.php(260): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput(Maps\GeoJsonPages\GeoJsonContent, MediaWiki\Page\PageIdentityValue, MediaWiki\Revision\RevisionStoreRecord, MediaWiki\Parser\ParserOptions, array)
#4 /srv/mediawiki/1.44/includes/Revision/RenderedRevision.php(233): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(Maps\GeoJsonPages\GeoJsonContent, array)
#5 /srv/mediawiki/1.44/includes/Revision/RevisionRenderer.php(236): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#6 /srv/mediawiki/1.44/includes/Revision/RevisionRenderer.php(169): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, MediaWiki\Parser\ParserOptions, array)
#7 /srv/mediawiki/1.44/includes/Revision/RenderedRevision.php(196): MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision{closure}(MediaWiki\Revision\RenderedRevision, array)
#8 /srv/mediawiki/1.44/includes/poolcounter/PoolWorkArticleView.php(110): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#9 /srv/mediawiki/1.44/includes/poolcounter/PoolWorkArticleView.php(81): MediaWiki\PoolCounter\PoolWorkArticleView->renderRevision()
#10 /srv/mediawiki/1.44/includes/poolcounter/PoolCounterWork.php(173): MediaWiki\PoolCounter\PoolWorkArticleView->doWork()
#11 /srv/mediawiki/1.44/includes/page/ParserOutputAccess.php(364): MediaWiki\PoolCounter\PoolCounterWork->execute()
#12 /srv/mediawiki/1.44/includes/page/Article.php(834): MediaWiki\Page\ParserOutputAccess->getParserOutput(MediaWiki\Page\WikiPage, MediaWiki\Parser\ParserOptions, MediaWiki\Revision\RevisionStoreRecord, int)
#13 /srv/mediawiki/1.44/includes/page/Article.php(551): MediaWiki\Page\Article->generateContentOutput(MediaWiki\User\User, MediaWiki\Parser\ParserOptions, int, MediaWiki\Output\OutputPage, array)
#14 /srv/mediawiki/1.44/includes/actions/ViewAction.php(80): MediaWiki\Page\Article->view()
#15 /srv/mediawiki/1.44/includes/actions/ActionEntryPoint.php(728): MediaWiki\Actions\ViewAction->show()
#16 /srv/mediawiki/1.44/includes/actions/ActionEntryPoint.php(505): MediaWiki\Actions\ActionEntryPoint->performAction(MediaWiki\Page\Article, MediaWiki\Title\Title)
#17 /srv/mediawiki/1.44/includes/actions/ActionEntryPoint.php(143): MediaWiki\Actions\ActionEntryPoint->performRequest()
#18 /srv/mediawiki/1.44/includes/MediaWikiEntryPoint.php(202): MediaWiki\Actions\ActionEntryPoint->execute()
#19 /srv/mediawiki/config/initialise/entrypoints/index.php(71): MediaWiki\MediaWikiEntryPoint->run()
#20 {main}

hcooper pushed a commit to hcooper/Maps that referenced this pull request Mar 24, 2026
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.

3 participants