Drop compat code for pre-MW-36 - #821
Conversation
📝 WalkthroughWalkthroughWikitextParser::wikitextToHtml now unconditionally calls getUserIdentity() when constructing ParserOptions, removing the previous method_exists check and fallback to getUser(). All other behavior remains the same, including empty input handling, parse invocation, and returning getText(). Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/Presentation/WikitextParser.php (1)
23-27: Optional: add a brief inline note about dropped pre-MW-1.36 compatTiny doc hint to future maintainers can save time when reading blame/PR title in isolation.
return $this->parser->parse( $text, $this->parser->getTitle(), - new ParserOptions( $this->parser->getUserIdentity() ) + // Requires MW ≥ 1.36 (Parser::getUserIdentity()) + new ParserOptions( $this->parser->getUserIdentity() ) )->getText();
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Presentation/WikitextParser.php(1 hunks)
🔇 Additional comments (2)
src/Presentation/WikitextParser.php (2)
26-26: Compat removal to MW ≥ 1.36 looks correctUnconditionally using
$this->parser->getUserIdentity()aligns with dropping pre-MW-1.36 compatibility. The rest of the call chain remains unchanged and appropriate.
26-26: No action required — MediaWiki requirement >=1.36 satisfied & no compat fallbacks found
- extension.json declares: ">= 1.40.0" — satisfies the >= 1.36 requirement.
- No remaining method_exists(...getUserIdentity) compatibility checks were found.
- The only ParserOptions usage is in src/Presentation/WikitextParser.php (lines ~26–28):
- new ParserOptions( $this->parser->getUserIdentity() )
Summary by CodeRabbit