title: add a new field in registration form, but it's doesn't work[fosuserbundle]
body: <p>I'm trying since yesterday to add a new field in the registration form, but its doesn't work.
  [fosuserbundle 1.3 -- symfony 2.6.11]</p>
  
  <p>I got an error message: </p>
  
  <p><strong>Attempted to load class "RegistrationFormType" from namespace "FOS\UserBundle\Form".
  Did you forget a "use" statement for "FOS\UserBundle\Form\Type\RegistrationFormType"?</strong> </p>
  
  <p>/protected function getFosUser_Registration_Form_TypeService()
      {return $this->services['fos_user.registration.form.type'] = new \FOS\UserBundle\Form\RegistrationFormType('FLY\UserBundle\Entity\User');
      } /</p>
  
  <p><strong>app/config</strong></p>
  
  <pre><code>imports:
      - { resource: parameters.yml }
      - { resource: security.yml }
      - { resource: services.yml }
  fos_user:
      db_driver:              orm
      firewall_name:          main
      user_class: FLY\UserBundle\Entity\User
      use_listener:           true
      #use_flash_notifications: true
      use_username_form_type: true
      model_manager_name:     null  # change it to the name of your entity/document manager if you don't want to use the default one.
      from_email:
          address:        ++++++++@hotmail.fr
          sender_name:    webmaster
      profile:
          form:
              type:               fos_user_profile
              name:               fos_user_profile_form
              validation_groups:  [Profile, Default]
      change_password:
          form:
              type:               fos_user_change_password
              name:               fos_user_change_password_form
              validation_groups:  [ChangePassword, Default]
      registration:
          confirmation:
              from_email: # Use this node only if you don't want the global email address for the confirmation email
                  address:       ++++++++@hotmail.fr
                  sender_name:   Webmaster
              enabled:    true # change to true for required email confirmation
              template:   FOSUserBundle:Registration:email.txt.twig
          form:
              type:               fos_user_registration
              name:               fos_user_registration_form
              validation_groups:  [Registration, Default]
      resetting:
          token_ttl: 86400
          email:
              from_email: # Use this node only if you don't want the global email address for the resetting email
                  address:        ...
                  sender_name:    ...
              template:   FOSUserBundle:Resetting:email.txt.twig
          form:
              type:               fos_user_resetting
              name:               fos_user_resetting_form
              validation_groups:  [ResetPassword, Default]
      service:
          mailer:                 fos_user.mailer.default
          email_canonicalizer:    fos_user.util.canonicalizer.default
          username_canonicalizer: fos_user.util.canonicalizer.default
          token_generator:        fos_user.util.token_generator.default
          user_manager:           fos_user.user_manager.default
      #group:
          #group_class:    ~ # Required when using groups
          #group_manager:  fos_user.group_manager.default
          #form:
              #type:               fos_user_group
              #name:               fos_user_group_form
              #validation_groups:  [Registration, Default]
  </code></pre>
  
  <p>user.php</p>
  
  <pre><code>&lt;?php
  // src/FLY/UserBundle/Entity/User.php
  
  namespace FLY\UserBundle\Entity;
  
  use FOS\UserBundle\Entity\User as BaseUser;
  use Doctrine\ORM\Mapping as ORM;
  use Symfony\Component\Validator\Constraints as Assert;
  
  /**
   * @ORM\Entity
   * @ORM\Table(name="fos_user")
   */
  class User extends BaseUser
  {
      /**
       * @ORM\Id
       * @ORM\Column(type="integer")
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      protected $id;
  
      /**
       * @ORM\Column(name="name", type="string", length=255)
       *
       * @Assert\NotBlank(message="Please enter your name.", groups={"Registration", "Profile"})
       * @Assert\Length(
       *     min=3,
       *     max="255",
       *     minMessage="The name is too short.",
       *     maxMessage="The name is too long.",
       *     groups={"Registration", "Profile"}
       * )
       */
  
      protected $name;
  
  
      public function __construct()
      {
          parent::__construct();
          // your own logic
      }
  }
  </code></pre>
  
  <p><strong>services.yml</strong></p>
  
  <pre><code>services:
      fos_user.registration.form.type:
          class: FOS\UserBundle\Form\RegistrationFormType
          arguments: [%fos_user.model.user.class%]
          tags:
              - { name: form.type, alias: fos_user_registration }
  </code></pre>
  
  <p><strong>RegistrationFormType.php</strong> </p>
  
  <pre><code>&lt;?php
  /*
   * This file is part of the FOSUserBundle package.
   *
   * (c) FriendsOfSymfony &lt;http://friendsofsymfony.github.com/&gt;
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  namespace FOS\UserBundle\Form\Type;
  use Symfony\Component\Form\AbstractType;
  use Symfony\Component\Form\FormBuilderInterface;
  use Symfony\Component\OptionsResolver\OptionsResolver;
  use Symfony\Component\OptionsResolver\OptionsResolverInterface;
  class RegistrationFormType extends AbstractType
  {
      private $class;
      /**
       * @param string $class The User class name
       */
      public function __construct($class)
      {
          $this-&gt;class = $class;
      }
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder
              -&gt;add('email', 'email', array('label' =&gt; 'form.email', 'translation_domain' =&gt; 'FOSUserBundle'))
              -&gt;add('username', null, array('label' =&gt; 'form.username', 'translation_domain' =&gt; 'FOSUserBundle'))
              -&gt;add('plainPassword', 'repeated', array(
                  'type' =&gt; 'password',
                  'options' =&gt; array('translation_domain' =&gt; 'FOSUserBundle'),
                  'first_options' =&gt; array('label' =&gt; 'form.password'),
                  'second_options' =&gt; array('label' =&gt; 'form.password_confirmation'),
                  'invalid_message' =&gt; 'fos_user.password.mismatch',
              ))
          ;
      }
      public function configureOptions(OptionsResolver $resolver)
      {
          $resolver-&gt;setDefaults(array(
              'data_class' =&gt; $this-&gt;class,
              'intention'  =&gt; 'registration',
          ));
      }
      // BC for SF &lt; 2.7
      public function setDefaultOptions(OptionsResolverInterface $resolver)
      {
          $this-&gt;configureOptions($resolver);
      }
      public function getName()
      {
          return 'fos_user_registration';
      }
  }
  </code></pre>
  
  <p>I followed all the instructions in the documentation but it doesn't work.</p>
  
  <p>Thank you</p>