title: Symfony - Unable to transform value for property path launchdate: Expected a \DateTimeInterface
body: <p>I'm trying to add a new product with a price containing a launchdate.
  This results into the error in the title.</p>
  
  <p><em>Product.php</em></p>
  
  <pre><code>...
  public function __construct() {
      $this-&gt;clients = new ArrayCollection();
      $this-&gt;priceupdates = new ArrayCollection();
      $this-&gt;currentPrice = new PriceUpdate();
  }
  ...
  </code></pre>
  
  <p><em>ProductController.php</em></p>
  
  <pre><code>...
  public function newAction(Request $request) {
      $entity = new Product();
      $form = $this-&gt;createForm(ProductType::class, $entity);
  ...
  </code></pre>
  
  <p><em>ProductType.php</em></p>
  
  <pre><code>...
  public function buildForm(FormBuilderInterface $builder, array $options) {
  
      $builder
      -&gt;add('description', TextType::class)
      -&gt;add('ProductPriceUpdate', ProductPriceUpdateType::class ,array(
          'data_class' =&gt; PriceUpdate::class))
      -&gt;add('clients', EntityType::class, array(
          'class' =&gt; 'AppBundle:Client',
          'choice_label' =&gt; 'naam',
          'multiple' =&gt; true
          ))
      -&gt;add('reset', ResetType::class, array(
          'label' =&gt; 'Reset',
          'attr'  =&gt; array(
              'class' =&gt; 'btn btn-danger'
          )))
      -&gt;add('submit', SubmitType::class, array(
          'label' =&gt; 'Create',
          'attr'  =&gt; array(
              'class' =&gt; 'btn btn-success'
          )));
  }
  ...
  </code></pre>
  
  <p><em>ProductPriceUpdateType.php</em></p>
  
  <pre><code>class ProductPriceUpdateType extends AbstractType {
  
      /**
       * @param FormBuilderInterface $builder
       * @param array $options
       */
      public function buildForm(FormBuilderInterface $builder, array $options) {
          $builder
          -&gt;add('price', MoneyType::class)
          -&gt;add('launchdate', DateType::class);
      }
  ...
  }
  </code></pre>
  
  <p><em>PriceUpdate.php</em></p>
  
  <pre><code>public function __construct() {
          $this-&gt;launchdate = \DateTime::createFromFormat('m/d/Y', 'now');
  </code></pre>
  
  <p>Stacktrace</p>
  
  <pre><code>Symfony\Component\Form\Exception\TransformationFailedException:
  Unable to transform value for property path "launchdate": Expected a \DateTimeInterface.
  
    at vendor\symfony\symfony\src\Symfony\Component\Form\Form.php:1107
    at Symfony\Component\Form\Form-&gt;normToView(false)
       (vendor\symfony\symfony\src\Symfony\Component\Form\Form.php:350)
    at Symfony\Component\Form\Form-&gt;setData(false)
       (vendor\symfony\symfony\src\Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper.php:49)
    at Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper-&gt;mapDataToForms(object(PriceUpdate), object(RecursiveIteratorIterator))
       (vendor\symfony\symfony\src\Symfony\Component\Form\Form.php:383)
    at Symfony\Component\Form\Form-&gt;setData(object(PriceUpdate))
       (vendor\symfony\symfony\src\Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper.php:49)
    at Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper-&gt;mapDataToForms(object(Product), object(RecursiveIteratorIterator))
       (vendor\symfony\symfony\src\Symfony\Component\Form\Form.php:383)
    at Symfony\Component\Form\Form-&gt;setData(object(Product))
       (vendor\symfony\symfony\src\Symfony\Component\Form\Form.php:487)
    at Symfony\Component\Form\Form-&gt;initialize()
       (vendor\symfony\symfony\src\Symfony\Component\Form\FormBuilder.php:226)
    at Symfony\Component\Form\FormBuilder-&gt;getForm()
       (vendor\symfony\symfony\src\Symfony\Component\Form\FormFactory.php:30)
    at Symfony\Component\Form\FormFactory-&gt;create('AppBundle\\Form\\Type\\ProductType', object(Product), array())
       (vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait.php:331)
    at Symfony\Bundle\FrameworkBundle\Controller\Controller-&gt;createForm('AppBundle\\Form\\Type\\ProductType', object(Product))
       (src\AppBundle\Controller\ProductController.php:82)
    at AppBundle\Controller\ProductController-&gt;newAction(object(Request))
    at call_user_func_array(array(object(ProductController), 'newAction'), array(object(Request)))
       (vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php:153)
    at Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(object(Request), 1)
       (vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php:68)
    at Symfony\Component\HttpKernel\HttpKernel-&gt;handle(object(Request), 1, true)
       (vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php:169)
    at Symfony\Component\HttpKernel\Kernel-&gt;handle(object(Request))
       (web\app_dev.php:29)
    at require('C:\\Users\\rsluimers\\PhpstormProjects\\LunchApp\\LunchApp\\web\\app_dev.php')
       (vendor\symfony\symfony\src\Symfony\Bundle\WebServerBundle\Resources\router.php:42)
  </code></pre>
  
  <p>I don't see anything wrong with it and I don't understand why a \DateTimeInterface is expected.</p>