My custom registration form was working well with the version 1.2.* but when i update symfony in 2.1 and FOSUserBundle in 2.0.*, I’ve got this problem that I don’t know how to resolve.
The error :
The type name specified for the service “kairos_user.registration_form_type” does not match the actual name. Expected “kairos_user_registration”, given “fos_user_registration”
My service definition :
services:
kairos_user.registration_form_type:
class: Kairos\UserBundle\Form\Type\RegistrationFormType
arguments: [%fos_user.model.user.class%]
tags:
- { name: form.type, alias: kairos_user_registration }
And my config.yml
fos_user:
db_driver: orm #cf kairos doctrine admin
firewall_name: main
user_class: Kairos\UserBundle\Entity\User
registration:
form:
type: kairos_user_registration
The alias of your registration form service must match the name returned by your registration form type class. In
Kairos\UserBundle\Form\Type\RegistrationFormTypetry to change the return value of getName() method