Last modified: 2012-12-13 11:19:20 UTC
which output format supports associative arrays is NOT a matter of configuration. The format either does, or it doesn't. Also, the current default for getUsekeys disables keys for the "php" and "wddx" formats - although associative arrays should work fine with these. As far as I know, only XML output does not support this (but this needs checking). So, Wikibase\Api::getUsekeys() should just return false for formats known not to support associative arrays / maps, and default to true otherwise. Test cases should be adapted accordingly.
It seems that only XML should disable keys. So we can simply ask if it is XML. For all other formats, we can use keys. This should not be configurable.
I really don't like this because it locks the code to the existing formats. If someone makes a specialized format and wants to use this extension, then he must patch the extension to make it work with the new format if that does not support use of keys. The present formats that does not support usekeys are XML (WDDX is encoded as XML) and their pretty formatted versions.
https://gerrit.wikimedia.org/r/#/c/21317/
Verified in Wikidata demo time for sprint 14