title: Symfony Dynamic class names are not allowed in compile-time
body: <p>I am trying to initialize dynamically a form. The form name is stored in $obj->getFormTypeName().</p>
  
  <pre><code>$formName = 'Acme\testBundle\Form\CustomType\\'.ucfirst($obj-&gt;getFormTypeName()).'Type';
  $contactForms[$obj-&gt;getId()] = $this-&gt;createForm($formName::class);
  </code></pre>
  
  <p>But I get the error : <code>Compile Error: Dynamic class names are not allowed in compile-time ::class fetch</code> </p>
  
  <p>Is there a way to initialize dynamically a form with the Scope Resolution Operator in Symfony ?</p>
  
  <p>Thanks for reading.</p>