HomePhabricator

registration: Overhaul merging of globals

Authored by Legoktm.

Description

registration: Overhaul merging of globals

Instead of hardcoding specific global settings in ExtensionRegistry,
create specific "merge strategies" that are used to merge globals.

Merge strategies are set for core properties in the ExtensionProcessor,
and extensions can set them for their own configuration settings using
the magic "_merge_strategy" key.

The following merge strategies are included:

  • array_merge_recursive - call array_merge_recursive on the two arrays
  • array_plus - use the "+" operator to combine arrays, preserving integer keys
  • array_plus_2d - A version of array_plus that works on 2d arrays, used for merging arrays like $wgGroupPermissions
  • array_merge - call array_merge (default)

This changes the merging of various namespaces related settings to use
array_plus so they actually work.

Bug: T107646
Change-Id: I64cb0553864e3b78b0f203333f58bb73b86a6434

Details

Committed
LegoktmSep 13 2015, 7:31 AM
Parents
rMWf36683f47fe3: registration: Fix merging of $wgRevokePermissions
Branches
Unknown
Tags
Unknown
References
refs/changes/71/237971/1
ChangeId
I64cb0553864e3b78b0f203333f58bb73b86a6434