Skip to content

Fix MW 1.47 compatibility: OutputPage::parserOptions() was removed#51

Merged
malberts merged 1 commit into
ProfessionalWiki:masterfrom
M-dev-stack:fix/mw147-parser-options
Jul 16, 2026
Merged

Fix MW 1.47 compatibility: OutputPage::parserOptions() was removed#51
malberts merged 1 commit into
ProfessionalWiki:masterfrom
M-dev-stack:fix/mw147-parser-options

Conversation

@M-dev-stack

@M-dev-stack M-dev-stack commented Jul 16, 2026

Copy link
Copy Markdown

OutputPage::parserOptions() was removed in MediaWiki core (wikimedia/mediawiki@3772013). FormatterBuilder still called it, causing FormattingTest::testHtmlFormat to fail on MW master and item pages with localMedia statements to fatal on MW 1.47.

Use ParserOptions::newFromContext() instead, which is available in all supported MediaWiki versions.

Fixes #50

Same approach as #46 by @a-random-lemurian.

Verification:

OutputPage::parserOptions() was removed in MediaWiki core (wikimedia/mediawiki@3772013). FormatterBuilder still called it, causing FormattingTest::testHtmlFormat to fail on MW master and item pages with localMedia statements to fatal on MW 1.47.

Use ParserOptions::newFromContext() instead, which is available in all supported MediaWiki versions.

Fixes ProfessionalWiki#50

@physikerwelt physikerwelt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@malberts
malberts merged commit ddc6c87 into ProfessionalWiki:master Jul 16, 2026
10 checks passed
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.

Compatibility with MW 1.47

3 participants