Handle extension dependencies in the installer
authorKunal Mehta <legoktm@member.fsf.org>
Sun, 8 Apr 2018 23:26:01 +0000 (16:26 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Fri, 13 Apr 2018 22:28:40 +0000 (15:28 -0700)
commitc8833d8e8ecc1b60f289f5c1ffdb15b2f6d44f8b
tree60faad65c982c96166d70e27819d441f7b3bb7eb
parent4e7673c5b0aa1d53e69c850ccc58446abf29b3d5
Handle extension dependencies in the installer

As there will likely be extensions bundled with the 1.31 release that
depend upon other extensions, we should have the installer prevent users
from enabling extensions that depend on other, not-enabled extensions.

We can build a dependency map from extension.json's "requires"
component. On the client-side, we'll first disable all checkboxes that
require other extensions, and evaluate each checkbox click, updating the
disabled checkboxes as possible.

This required some refactoring of how ExtensionRegistry reports issues
with dependency resolution so we could get a list of what was missing.

While we're at it, sort the extensions under headings by type.

This does not support skins that have dependencies yet (T186092).

Bug: T31134
Bug: T55985
Change-Id: I5f0e3b1b540b5ef6f9b8e3fc2bbaad1c65b4b680
autoload.php
includes/installer/Installer.php
includes/installer/WebInstaller.php
includes/installer/WebInstallerOptions.php
includes/installer/i18n/en.json
includes/installer/i18n/qqq.json
includes/registration/ExtensionDependencyError.php [new file with mode: 0644]
includes/registration/ExtensionRegistry.php
includes/registration/VersionChecker.php
mw-config/config.js
tests/phpunit/includes/registration/VersionCheckerTest.php