Allow ParserHooks 3.x#893
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ParserHooks 3.0.0 reverts to a pure PHP library distribution: no
extension.json, noi18n/, nowfLoadExtensioncall. 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:
~1.xcontinue to get ParserHooks 1.6.x; nothing breaks.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 fromLocalSettings.php; ParserHooks 3.x is a pure Composer library and no longer registers as a MediaWiki extension. Maps itself doesn't callwfLoadExtension( 'ParserHooks' )anywhere, so no Maps-side change is needed.Test plan
🤖 Generated with Claude Code