wiki.techinc.nl/tests/phpunit/includes/resourceloader
Roan Kattouw 9316f2e3c3 resourceloader: Change 'packageFiles' format to be JSON-compatible
The module definition format for 'packageFiles', as initially designed,
mixes sequential and associative arrays. This works in PHP, but not in
JSON. To make the format JSON compatible, use a 'name' key instead of
using the key in the main array.

Leave backwards compatibility in place so that extensions using the old
format can be migrated. This will be removed in the next commit.

Before:

'packageFiles' => [
	'script.js',
	'script2.js',
	'config.json' => [ 'config' => [ 'Foo', 'Bar' ] ],
	'data.json' => [ 'callback' => function () { ... } ],
],

After:

'packageFiles' => [
	'script.js',
	'script2.js',
	[ 'name' => 'config.json', 'config' => [ 'Foo', 'Bar' ] ],
	[ 'name' => 'data.json', 'callback' => function () { ... } ],
],

This can then be written in extension.json as:
"packageFiles": [
	"script.js",
	"script2.js",
	[ "name": "config.json", "config": [ "Foo", "Bar" ] ],
	[ "name": "data.json", "callback: [ "MyExtHooks", "getData" ] ]
]

Change-Id: Ic566a1cd7efd075c380bc50ba0cc2c329a2041d7
2019-02-22 19:06:39 +00:00
..
templates
DerivativeResourceLoaderContextTest.php Generalize ResourceLoader 'excludepage' functionality 2018-04-25 00:37:08 +00:00
MessageBlobStoreTest.php resourceloader: Make $rl parameter mandatory for MessageBlobStore 2019-02-19 17:16:57 +00:00
ResourceLoaderClientHtmlTest.php resourceloader: Reduce 'implement' overhead for modules without scripts 2019-02-09 22:46:58 +00:00
ResourceLoaderContextTest.php Generalize ResourceLoader 'excludepage' functionality 2018-04-25 00:37:08 +00:00
ResourceLoaderFileModuleTest.php resourceloader: Change 'packageFiles' format to be JSON-compatible 2019-02-22 19:06:39 +00:00
ResourceLoaderImageModuleTest.php Use ::class to resolve class names in tests 2018-01-26 22:49:13 +01:00
ResourceLoaderImageTest.php Use fallback languages in ResourceLoaderImage 2018-04-01 20:41:01 +01:00
ResourceLoaderLessVarFileModuleTest.php Add missing empty lines between methods 2019-01-15 19:14:35 +00:00
ResourceLoaderModuleTest.php resourceloader: Remove selective build optimisation from getModuleContent() 2018-08-30 21:02:57 +00:00
ResourceLoaderOOUIImageModuleTest.php Use ::class to resolve class names in tests 2018-01-26 22:49:13 +01:00
ResourceLoaderSkinModuleTest.php resourceloader: Remove unused static SkinModule::getLogo method 2018-08-28 23:50:50 +01:00
ResourceLoaderStartUpModuleTest.php Add missing empty lines between methods 2019-01-15 19:14:35 +00:00
ResourceLoaderTest.php Use packageFiles feature to replace special-purpose RL modules 2019-02-09 00:10:48 +00:00
ResourceLoaderWikiModuleTest.php Clear the title cache in MutableRevisionRecordTest 2018-10-25 21:16:27 +00:00