HomePhabricator

Form representations: languages as key

Description

Form representations: languages as key

Languages are used as keys of form representations (ever since T190928 /
I054e894d8f1c8b564389c45ba285edef558d6c74), RequestParsers'
validateRepresentationLanguage() methods enforce that key and language
are consistent. A situation in which the map is decoded from JSON, the
info is consistent, but two items with the same key exist can be
logically ruled out.
There is a vague chance that we receive a malformed JSON payload that
contains a "map" with the same language key twice (not really
organically producable by a client) - in that case the last one will
prevail; which feels acceptable IMHO and would require massive overhead
to address.

Change-Id: Ib6f726d6a1b1bb0f878d473ca0fae958f34ab7df

Details

Provenance
Pablo-WMDEAuthored on May 3 2018, 4:45 PM
Parents
rEWLEc6cba5bef031: Use getTestUser instead of Mock user when calling saveEntity
Branches
Unknown
Tags
Unknown
ChangeId
Ib6f726d6a1b1bb0f878d473ca0fae958f34ab7df