registration: Improve merging of arrays
authorKunal Mehta <legoktm@gmail.com>
Fri, 13 Feb 2015 07:40:13 +0000 (23:40 -0800)
committerTim Starling <tstarling@wikimedia.org>
Mon, 16 Feb 2015 23:12:32 +0000 (23:12 +0000)
commit1b22e7783b262f19630c44471870b0f233ee7454
treea9986ec6f92fcd9be6250e2df1e7da88e445eb07
parent52724de0281d6b0e354970138537956f288f482e
registration: Improve merging of arrays

Currently we use array_merge_recursive when merging any array, which is really
only needed for merging $wgHooks entries, and causes issues when trying to
merge default settings if the config is already set.

$wgHooks and $wgGroupPermissions are now special cased when merging, and all
other arrays are just +='d.

Bug: T88665
Bug: T89364
Change-Id: I773a9463d4428aa618c17f848c01b24e04610e95
includes/registration/ExtensionRegistry.php
tests/phpunit/includes/registration/ExtensionRegistryTest.php [new file with mode: 0644]