resourceloader: Deduplicate module registration conflicts
authorOri Livneh <ori@wikimedia.org>
Mon, 26 Oct 2015 18:23:43 +0000 (11:23 -0700)
committerKrinkle <krinklemail@gmail.com>
Mon, 26 Oct 2015 18:48:05 +0000 (18:48 +0000)
commitb1ea0612f8beec5af1142da5b8075ab3427efa4c
tree3df1978aec942d5bd4f42c4c014d6267d2bf31af
parent602d7901dda5492153cf90bfe12a8d005dbad0af
resourceloader: Deduplicate module registration conflicts

If an attempt is made to register a ResourceLoader module which has already
been registered, instead of bailing with an error, issue a warning instead, and
allow the lattermost set of module parameters to stick.

Because modules are registered from extensions, and because modules are often
migrated from one extension to another as extensions are refactored, and
because the developers of different extensions are not always aware of each
other's work, throwing an error runs a high risk of causing an outage.

Bug: T116628
Change-Id: Ie3499d9f2ff3bf071f1c2b0176e19440ff55211c
includes/resourceloader/ResourceLoader.php