Avoid injecting the user language into a service. If the service depends on a language, make it part of the parameters when the service is used (possibly indirectly, e.g. via an \IContextSource).
since 7.1. Static DataValue::newFromArray constructors like this are underspecified (not in the DataValue interface), and misleadingly named (should be named newFromArrayValue). Instead, use DataValue builder callbacks in
The value returned by this method might differ in case from the original, unparsed statement GUID (the entity ID part might have been lowercase originally, but is always normalized in the return value here), which means that the value should not be compared to other statement GUID serializations, e.g. to look up a statement in a StatementList.
since 5.1, will be removed in favor of StatementListProvider, which gives the guarantee to return a mutable object. Changes to that object change the entity.
Avoid injecting the user language into a service. If the service depends on a language, make it part of the parameters when the service is used (possibly indirectly, e.g. via an \IContextSource).