Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Refactor internal transformer methods to be more strict #256
Be strict about incoming values to transformNested(). 82ec81c introduced support a non-iterable $objects parameter, and proxied to transform(). This method should never be called in that case, so throwing an exception should allow us to catch bad logic or mappings.
Additionally, do not accept ArrayAccess objects when we expect an iterable value. Support for ArrayAccess in normalizeValue() dates back to 0db0490 (likely an oversight).
Lastly, use an equality check instead of calling is_null(), as it is more efficient.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
@daFish: Based on the ES documentation for object and nested types, it looks like these are comparable to
Fields mapped as