registration: Allow string value for Hooks
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Fri, 29 Apr 2016 21:21:40 +0000 (23:21 +0200)
committerKunal Mehta <legoktm@member.fsf.org>
Tue, 3 May 2016 20:23:07 +0000 (13:23 -0700)
commit7c4d73183cd9a2b383dee213fa8de60aeec399db
tree08c47cc7d34e787c73ab613d2dcf81c67b9e56f9
parente7f803b071df26963726481e876779765f068ff7
registration: Allow string value for Hooks

Instead of forcing an object even for single-hook-listeners, allow
string values, too (one hook listener for one hook, only). Also:
use it as default for the conversion script, if only one listener
is added to a hook (which is usually the case). This leads into a
much cleaner output of the Hooks section of extension.json.

Bug: T133628
Change-Id: Ie9e54f0931c41706eb8d82d00256698992ec41cc
docs/extension.schema.json [changed mode: 0644->0755]
includes/registration/ExtensionProcessor.php [changed mode: 0644->0755]
maintenance/convertExtensionToRegistration.php [changed mode: 0644->0755]
tests/phpunit/includes/registration/ExtensionProcessorTest.php