registration: Only allow one extension to set a specific config setting
authorFlorian Schmidt <florian.schmidt.stargatewissen@gmail.com>
Mon, 17 Apr 2017 20:36:30 +0000 (22:36 +0200)
committerKunal Mehta <legoktm@member.fsf.org>
Tue, 22 Aug 2017 09:45:24 +0000 (02:45 -0700)
commit50d7546057c1089228a2a6d7d4a49d78d72887e3
tree61aac58204487a9c0aeee2ad189ceae38ed586c5
parentd6276525455e6a00fffc90229ef81a1fc8feaa25
registration: Only allow one extension to set a specific config setting

ExtensionProcessor would previously just blindly overwrite duplicate
config settings, which ends up depending upon load order.

It's relatively hard to debug since it is silently overwritten. This now
throws exceptions in case of duplicate config settings.

This will also have some side-effects of catching people putting things
like "ResourceModules" in their "config" section when it should be a
top-level item.

Bug: T152929
Change-Id: Iaef32efab397e82ff70ddca8ac79c545c5b7d2bb
includes/registration/ExtensionProcessor.php
tests/phpunit/includes/registration/ExtensionProcessorTest.php