title: Form field default value with DataTransformer
body: <p>I can't set the default value of a form field that has a DataTransformer attached to it.</p>
  
  <p>Let's take the example from the <a href="http://symfony.com/doc/current/form/data_transformers.html" rel="nofollow noreferrer">official documentation on DataTransformers</a>:</p>
  
  <pre><code>class TaskType extends AbstractType
  {
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder
          -&gt;add('description', TextareaType::class)
          -&gt;add('issue', TextType::class)
      ;
  }
  
  public function configureOptions(OptionsResolver $resolver)
  {
      $resolver-&gt;setDefaults(array(
          'data_class' =&gt; Task::class,
      ));
  }
  </code></pre>
  
  <p>In the example, a ModelTransformer is added to the 'issue' field, transforming the Issue object into a string (the issue number) when rendering the form, and transforming it back to an Issue upon form submission.</p>
  
  <p>Now I'm setting a default value for the issue field through the builder options:</p>
  
  <pre><code>public function buildForm(FormBuilderInterface $builder, array $options)
  {
      $issue = $options['issue']; //$issue contains an Issue Object from the controller
      $builder
          -&gt;add('description', TextareaType::class)
          -&gt;add('issue', TextType::class, array(
              'data' =&gt; $issue
          ))
      ;
  }
  </code></pre>
  
  <p>When rendering the form I get the following error:</p>
  
  <blockquote>
    <p>The form's view data is expected to be an instance of class AppBundle/Entity/Issue, but is a(n) string. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms a(n) string to an instance of AppBundle/Entity/Issue.</p>
  </blockquote>
  
  <ul>
  <li>Dumping $issue returns an Issue object</li>
  <li>Setting the data_class option to null as suggested returns the same error</li>
  <li>Passing $issue->getId() instead of $issue gets me the following error: "Call to a member function getId() on integer"</li>
  </ul>
  
  <p>I really don't understand this error, I hope you'll be able to help !</p>