title: Passing data to buildForm() in Symfony 2.8, 3.0 and above
body: <p>My application currently passes data to my form type using the constructor, as recommended in <a href="https://stackoverflow.com/a/7818709/526495">this answer</a>. However the <a href="https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md" rel="noreferrer">Symfony 2.8 upgrade guide</a> advises that passing a type instance to the <code>createForm</code> function is deprecated:</p>
  
  <blockquote>
    <p>Passing type instances to Form::add(), FormBuilder::add() and the
    FormFactory::create*() methods is deprecated and will not be supported
    anymore in Symfony 3.0. Pass the fully-qualified class name of the
    type instead.</p>
  
  <pre><code>Before:    
  $form = $this-&gt;createForm(new MyType());
  
  After:
  $form = $this-&gt;createForm(MyType::class);
  </code></pre>
  </blockquote>
  
  <p>Seeing as I can't pass data through with the fully-qualified class name, is there an alternative?</p>