Users of newFromArray give no guarantee that the value passed in
is actually the array. DataValueObject::requireArrayFields
asserts that the value is an array, and throws the exception
that callers can handle. Having no strict array requirement
lets callers handle erroneous input nicer.
Other DataValue classes already seem to follow similar pattern.
Users of newFromArray give no guarantee that the value passed in is actually the array. DataValueObject::requireArrayFields asserts that the value is an array, and throws the exception that callers can handle. Having no strict array requirement lets callers handle erroneous input nicer. Other DataValue classes already seem to follow similar pattern.
Strict array requirement was related to: https://phabricator.wikimedia.org/T168681