title: Symfony Serializer component: Deserialize array of objects of mixed types
body: <p>I would like to know if there is a method to deserialize an array containing objects of different types. I built something where I can serialize and deserialize an array of objects of a specific type like this:</p>
  
  <pre><code>$nodes = [
      new PostNode(),
      new PostNode(),
      new PostNode()
  ];
  
  $serializer = new Serializer( [
      new ObjectNormalizer(),
      new ArrayDenormalizer(),
  ], [ new JsonEncoder() ] ); 
  
  $data = $serializer-&gt;serialize($nodes, 'json');
  
  $deSerializedNodes = $serializer-&gt;deserialize( $data, PostNode::class . '[]', 'json' );
  </code></pre>
  
  <p>I get exactly the array back that I inserted so that is good. Now I want to know if I can serialize and deserialize an array like this:</p>
  
  <pre><code>$nodes = [
      new PostNode(),
      new PostNode(),
      new PostNode(),
      new FormNode(),
      new FormNode()
  ];
  </code></pre>