Page MenuHomePhabricator

get rid of getUsekeys setting
Closed, ResolvedPublic

Description

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.


Version: master
Severity: normal
Whiteboard: storypoints: 1

Details

Reference
bz39500

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:59 AM
bzimport set Reference to bz39500.
bzimport added a subscriber: Unknown Object (MLST).

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.

Verified in Wikidata demo time for sprint 14