registration: Add resource template-like functionality to extension.json
authorKunal Mehta <legoktm@gmail.com>
Fri, 6 Feb 2015 09:46:05 +0000 (01:46 -0800)
committerKunal Mehta <legoktm@gmail.com>
Mon, 9 Feb 2015 23:14:06 +0000 (15:14 -0800)
commit912a5e5ec3b11a048214f4df04635c6709471b5d
treece79591f1c11184081d8e9c7598563698da1813c
parent978fc13da2a6272dee1a5924305b1eb48990bcd8
registration: Add resource template-like functionality to extension.json

This allows for extensions to specify common arguments to ResourceLoader
module definitions by only specifying them once.

The only supported values are "localBasePath" (which is relative to the
current directory), "remoteSkinPath", and "remoteExtPath". If a module
is using a custom class or is already specifying paths, the default paths
will not be added.

Tests are included to cover existing functionality and newly added
functionality. The convertExtensionToRegistration.php script was also
extended to try and guess what the default paths should be.

Bug: T88786
Change-Id: I802461796e8d8584dacf3b0c811b5ba97a4a8f7f
docs/extension.schema.json
includes/registration/ExtensionProcessor.php
maintenance/convertExtensionToRegistration.php
tests/phpunit/includes/registration/ExtensionProcessorTest.php