Disallow associative arguments in ObjectFactory
authorGergő Tisza <tgr.huwiki@gmail.com>
Thu, 29 Oct 2015 02:06:37 +0000 (19:06 -0700)
committerGergő Tisza <tgr.huwiki@gmail.com>
Tue, 24 Nov 2015 00:10:42 +0000 (00:10 +0000)
commit10cf632683d41bbfcb6a930f68d4f10b231b87dc
tree3e4bdb4901a447e2bac2b7cc499fcc7aa32d214b
parent20b7696494572b6ce8b7bd70d63cdc186484d5af
Disallow associative arguments in ObjectFactory

There is no strong use case for associative "decoration"
of constructor arguments (the documentation benefits
mentioned in I43aa085 are outweighed by the confusion
caused by not failing loudly when someone passes an
associative argument by accident, e.g. by omitting an
array nesting level), so disallow them but make sure
they fail nicely, not with an invalid offset error.

Change-Id: I09e4af85ded6a1497b0db0265d2ee6707f91f5e3
includes/libs/ObjectFactory.php
tests/phpunit/includes/libs/ObjectFactoryTest.php