0
votes

an exception appears when i am trying to customise registration form using fosuserbundle Attempted to load class "RegistrationFormType" from namespace "PFE\UserBundle\Form\Type". Did you forget a "use" statement for another namespace? mu code namespace PFE\UserBundle\Form\Type; use Symfony\Component\Form\FormBuilderInterface;

use FOS\UserBundle\Form\Type\RegistrationFormType as BaseType;

class RegistrationFormType extends BaseType { public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('nom')->add('prenom'); } public function getName() { return 'pfe_user_registration'; } }

1

1 Answers

0
votes

Probably just adding a \ this way:

use \FOS\UserBundle\Form\Type\RegistrationFormType as BaseType;

Another possible solution is flushing APC. If you have set up APC sometimes it produces this kind of misterious errors. To do that just restart your Apache, Nginx or the webserver you are using.

I hope this will help.