title: Symfony 3.4 : "Could not load type ... : class does not exist"
body: <p>Sorry, I'm a beginner at Symfony and I've tried to find an answer but nothing worked. I'm using Symfony3.4 which was updated from Symfony 2.8 a few months ago.</p>
  
  <p>Now, I'm trying to do a rather simple thing : using a formType in a Controller, but no matter what, Symfony keeps showing the following error : <strong>Could not load type "Cha\GeneralBundle\Form\StripePaymentType": class does not exist.</strong></p>
  
  <p>Here's my StripePaymentType -really, really basic:</p>
  
  <pre><code>namespace Cha\GeneralBundle\Form;
  
  use Symfony\Component\Form\AbstractType;
  use Symfony\Component\Form\Extension\Core\Type\TextType;
  use Symfony\Component\Form\FormBuilderInterface;
  
  class StripePaymentType extends AbstractType
  {
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder-&gt;add('name', TextType::class);
      }
  
      public function getBlockPrefix()
      {
          return 'cha_stripe_payment_form';
      }
  
  }
  </code></pre>
  
  <p>Here's my Controller action, once again, a basic thing (I didn't even write any code in there, because of this strange error) :</p>
  
  <pre><code>public function upgradeOfferPaymentAction(Offers $offers)
  {
  
      $form = $this-&gt;createForm(StripePaymentType::class);
  
  
      return $this-&gt;render(
          '@ChaGeneral/Offers/offer_payment.html.twig', array(
              'form' =&gt; $form-&gt;createView()
      ));
  }
  </code></pre>
  
  <p>I tried to use my form as a service but it did not work either :</p>
  
  <pre><code>cha.stripe.payment.form:
      class: Cha\GeneralBundle\Form\StripePaymentType
      tags:
          - { name: cha_stripe_payment_form }
  </code></pre>
  
  <p>I'm probably missing something but I can't figure what...</p>
  
  <p>Thank in advance for your help!</p>