Skip to content

Allow ParserHooks 3.x#893

Merged
JeroenDeDauw merged 1 commit into
masterfrom
allow-parser-hooks-3
May 9, 2026
Merged

Allow ParserHooks 3.x#893
JeroenDeDauw merged 1 commit into
masterfrom
allow-parser-hooks-3

Conversation

@JeroenDeDauw
Copy link
Copy Markdown
Member

Summary

ParserHooks 3.0.0 reverts to a pure PHP library distribution: no extension.json, no i18n/, no wfLoadExtension call. The classes Maps consumes -- HookDefinition, HookHandler, HookRegistrant -- are stable since ParserHooks 1.0 and unchanged between 1.6.x and 3.0.x, so the upgrade is API-safe.

This widens the constraint to allow ParserHooks 3.x alongside the existing 1.5+ range. Composer resolves the intersection of all installed extensions' constraints, so:

  • Sites running Maps + an extension still pinning ParserHooks ~1.x continue to get ParserHooks 1.6.x; nothing breaks.
  • Sites running Maps alone (or alongside extensions also opting into 3.x) get ParserHooks 3.0.x.

No other Maps code change is needed.

Migration note

When ParserHooks 3.0.x is selected, sites previously calling wfLoadExtension( 'ParserHooks' ) should remove that line from LocalSettings.php; ParserHooks 3.x is a pure Composer library and no longer registers as a MediaWiki extension. Maps itself doesn't call wfLoadExtension( 'ParserHooks' ) anywhere, so no Maps-side change is needed.

Test plan

  • CI green

🤖 Generated with Claude Code

ParserHooks 3.0.0 reverts to a pure PHP library distribution
(no extension.json, no i18n, no wfLoadExtension call).

Maps only consumes the HookDefinition, HookHandler, and
HookRegistrant classes, which are stable since ParserHooks 1.0
and identical between 1.6.x and 3.0.x. Adding the alternate
~3.0 constraint lets sites migrate to ParserHooks 3.x while
keeping installs that pin a 1.x-era ParserHooks (via another
extension) working unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JeroenDeDauw JeroenDeDauw marked this pull request as ready for review May 9, 2026 23:40
@JeroenDeDauw JeroenDeDauw merged commit 201cce6 into master May 9, 2026
12 checks passed
@JeroenDeDauw JeroenDeDauw deleted the allow-parser-hooks-3 branch May 9, 2026 23:40
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.

1 participant