Parisa
Parisa

Reputation: 801

FOSUserBundle : configuration error (handler)

I'm using Symfony 2.1 for a project and trying to use FOSUserBundle to manage the users.I am also following the documentation but i'm getting an error:

 Unrecognized options "handler" under "fos_user.change_password.form"

Any idea? Thanks in advance!

Upvotes: 3

Views: 1099

Answers (1)

Hyunmin Kim
Hyunmin Kim

Reputation: 971

FOSUserBundle recently went through several major changes in 2.0.x. The FOSUserBundle documentation as of right now is not up to date and currently is for 1.3.x and below.

If you would like to still use handlers, you can revert back to 1.3.x via composer. Take a look at the different releases on packagist.

The latest version of FOSUserBundle got rid of handlers and now uses EventListeners. You can take a look at the list of FOSUserEvents and decide which event you want to hook on to. You can see an example of subscribing to a FOSUserEvent from the controller on the "Hooking into the controllers" part of the documentation.

Also, note that if you're overriding the FOSUserBundle's controller, it now requires the Symfony2 Request component class as its parameter.

Upvotes: 1

Related Questions