FriendsOfSymfony/FOSElasticaBundle — pull request #256 by jmikola (2013-03-27 21:55:15+00:00)
Title: Refactor internal transformer methods to be more strict

Be strict about incoming values to transformNested(). 82ec81cb08c880d39a0a01c255cf7da4f2c0574d 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 0db0490be574dd4e33b736eb0e8a53d727d6fddb (likely an oversight).

Lastly, use an equality check instead of calling is_null(), as it is more efficient.