title: Could not load type Symfony2
body: <p>Ok it is probably something simple but i just cant find where the problem is.
  I have tried with but no match for my problem</p>
  
  <p>I am trying to create from but from form class, not create form in controller..</p>
  
  <p>here is the code..</p>
  
  <p>this is from controller</p>
  
  <pre><code>    /**
   * @Route("login", name="login")
   */
  public function loginAction (Request $request) {
      $registration = new Registration();
  
      $form = $this-&gt;createForm(LoginForm::class, $registration, array(
          'method' =&gt; 'POST'
      ));
  
      return $this-&gt;render(
          'admin/login.html.twig',
          array('form' =&gt; $form-&gt;createView())
      );
  }
  </code></pre>
  
  <p>Inside controller i used USE to defind LoginForm i use in part createForm, so that is not problem</p>
  
  <p>this is from FORM class</p>
  
  <pre><code>&lt;?php
  
  namespace AppBundle\AppForm;
  
  use Symfony\Component\Form\AbstractType;
  use Symfony\Component\Form\FormBuilderInterface;
  use Symfony\Component\Form\Extension\Core\Type\SubmitType;
  
  class LoginForm extends AbstractType {
  public function buildForm(FormBuilderInterface $builder, array $options)
  {
      $builder
          -&gt;add('name')
          -&gt;add('password')
          -&gt;add('save', SubmitType::class);
  }
  public function configureOptions(OptionsResolver $resolver)
  {
      $resolver-&gt;setDefaults(
          array(
            'data_class' =&gt; 'AppBundle\Entity\Registration'
          ));
  }
  
  public function getName()
  {
  
  }
  }
  </code></pre>