resourceloader: Omit empty parameters from mw.loader.implement calls
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 9 Dec 2014 01:17:53 +0000 (01:17 +0000)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 3 Apr 2015 06:20:51 +0000 (07:20 +0100)
commit3cf2f18bb80593ca3066ed4bf1eab0d341f80df6
treea958a128b8b7b66b3b46be758d73c3f7b832d0dd
parent254eb51e7f30e3a5870c8f46300322d898133c5e
resourceloader: Omit empty parameters from mw.loader.implement calls

Follows-up ebeb297231f393b6da0e719ce23.

Also:
* Add tests for ResourceLoader::makeLoaderImplementScript().
* Apply ResourceLoader::trimArray to makeLoaderImplementScript (new in c0c221bf).

This commit changes the load.php response to omit empty parameters.

These parameters were required until recently. The client has been
updated (1f393b6da and 0e719ce23) to make these optional, thus supporting
both the old server format and the change this commit makes

Clients with a tab open from before 0e719ce23 are naturally not
compatible with load.php responses from after this commit. Ensure
this is deployed several days after 0e719ce23 to reduce race
conditions of this nature.

(This is a re-submitted version of 4ce0c0da4)

Bug: T88879
Change-Id: I9e998261ee9b0b745e3339bc3493755c0cb04b6a
includes/resourceloader/ResourceLoader.php
tests/phpunit/includes/OutputPageTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderTest.php