symfony/symfony — pull request #2716 by armetiz (2011-11-24 14:31:27+00:00)
Title: XmlEncoder with arrays.

Maybe I'm on the wrong way,
But, XmlEncoder with array values isn't homogeneous.

Out-of-box, here some results :

Encode : array ( array ( "property_name" => ""), array ( "property_name" => ""));

Encode : array ( array ("property_name" => array ( null, null, null ) ), array ("property_name" => array ( null, null, null ) ) );

In the XmlEncoder source code, a comment say : "Create nodes to append to $parentNode based on the $key of this array".
And, according to my pull-request, the result is more elegant :

Encode : array ( array ("property_name" => array ( null, null, null ) ), array ("property_name" => array ( null, null, null ) ) );

This pull-request is simply the implementation of the comment.