title: Symfony serializer cannot deserialize into \DateTime
body: <p>I‘m trying to deserialize a json with the Symfony Serializer into a DTO, but I got always the exception <code>Symfony/Component/Serializer/Exception/MissingConstructorArgumentsException with message 'Cannot create an instance of DateTime from serialized data because its constructor requires parameter "time" to be present.'</code>. </p>
  
  <p>My DTO looks like this:</p>
  
  <pre class="lang-php prettyprint-override"><code>class ResponseDto
  {
      /** @var \DateTime */
      private $creationDate;
  
  
      /** @var NestedObject */
      private $result;
  
  
      public function __construct(
          \DateTime $creationDate,
          NestedObject $result
      ) { /* … */ }
  
      public function getCreationDate(): \DateTime
      {
          return $this-&gt;creationDate;
      }
  
      public function getResult(): NestedObject
      {
          return $this-&gt;result;
      }
  }
  </code></pre>
  
  <p>with a json like this:</p>
  
  <pre><code>[
    {
      "result":{
        "operations":{
          "successful":319698,
          "failed":2,
          "total":319700
        }
      },
      "creationDate":"2020-02-10T03:01:53.357Z"
    },
    // …
  ]
  </code></pre>
  
  <p>The deserialize call is also straight forward:</p>
  
  <pre class="lang-php prettyprint-override"><code>$serializer-&gt;deserialize(
      $data,
      ResponseDto::class . '[]',
      'json'
  );
  </code></pre>
  
  <p>And all necessary normalizer (and the symfony/property-info package) are installed/registered too:</p>
  
  <pre class="lang-sh prettyprint-override"><code>$ bin/console debug:container serializer --show-arguments
  
  Information for Service "serializer"
  ====================================
  
   Serializer serializes and deserializes data.
  
   ---------------- ----------------------------------------- 
    Option           Value                                    
   ---------------- ----------------------------------------- 
    Service ID       serializer                               
    Class            Symfony\Component\Serializer\Serializer  
    Tags             -                                        
    Public           yes                                      
    Synthetic        no                                       
    Lazy             no                                       
    Shared           yes                                      
    Abstract         no                                       
    Autowired        no                                       
    Autoconfigured   no                                       
    Arguments        Array (9 element(s))                     
                     Array (5 element(s))                     
   ---------------- ----------------------------------------- 
  
  
  $ bin/console debug:container --tag serializer.normalizer
  
  Symfony Container Services Tagged with "serializer.normalizer" Tag
  ==================================================================
  
   ------------------------------------------------- ---------- --------------------------------------------------------------------------- 
    Service ID                                        priority   Class name                                                                 
   ------------------------------------------------- ---------- --------------------------------------------------------------------------- 
    fos_rest.serializer.form_error_normalizer         -10        FOS\RestBundle\Serializer\Normalizer\FormErrorNormalizer                   
    reporting.reader.serializer                                  Symfony\Component\Serializer\Serializer                                    
    serializer.denormalizer.array                     -990       Symfony\Component\Serializer\Normalizer\ArrayDenormalizer                  
    serializer.normalizer.constraint_violation_list   -915       Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer  
    serializer.normalizer.data_uri                    -920       Symfony\Component\Serializer\Normalizer\DataUriNormalizer                  
    serializer.normalizer.dateinterval                -915       Symfony\Component\Serializer\Normalizer\DateIntervalNormalizer             
    serializer.normalizer.datetime                    -910       Symfony\Component\Serializer\Normalizer\DateTimeNormalizer                 
    serializer.normalizer.json_serializable           -900       Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer         
    serializer.normalizer.object                      -1000      Symfony\Component\Serializer\Normalizer\ObjectNormalizer                   
   ------------------------------------------------- ---------- --------------------------------------------------------------------------- 
  </code></pre>
  
  <p>Why is the serializer not able to deserialize the data into a <code>\DateTime</code> object? The <code>DateTimeNormalizer::supportsDenormalization()</code> is also called and returning <code>true</code> for the property, but <code>DateTimeNormalizer::denormalize()</code> is never called.</p>
  
  <p>Fun fact: If I change the type hint to <code>\DateTimeInterface</code> the serializer can deserialize the data, but produces <code>\DateTimeImmutable</code> (unfortunately I need <code>\DateTime</code> objects). </p>