convertExtensionToRegistration: Detect if composer autoloader is needed
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Wed, 30 Dec 2015 15:11:38 +0000 (16:11 +0100)
committerLegoktm <legoktm.wikipedia@gmail.com>
Thu, 7 Jan 2016 17:23:34 +0000 (17:23 +0000)
commit9dec78d4c02c64f008c0015b1051c04b96aeeb26
tree18a93d097745f8ee0e2119ba7dce1e67f26a180d
parent0a0b02b56c2c9f03918eab099d1e196ac513fa10
convertExtensionToRegistration: Detect if composer autoloader is needed

If an extension specifies a require section in its composer.json, which contains
some dependencies, we can assume that this extension needs to load the composer
autoloader.

The maintenance script convertExtensionToRegistration.php will now check if the
extension has such a composer.json and, if so, adds the load_composer_autoloader
property in extension.json, which will try to load the autoloader of composer
is it is present.

Also add a check for existence of a require section in ComposerJson library
(ComposerJson::getRequiredDependencies()).

Bug: T119766
Change-Id: Icdbc37abc44e642afee2aab4c0e9298d3471124d
includes/libs/composer/ComposerJson.php
maintenance/convertExtensionToRegistration.php