FriendsOfSymfony/FOSUserBundle — pull request #670 by bodokaiser (2012-06-21 06:26:02+00:00)
Title: Controller refactoring

I think it is required to refactor the controllers of the FOSUserBundle. I would like to this but I need to get Feedback!

Here is one thing that we have to discuss:

1. Should we use shortcut methods?
This is one major issue. There are already some shortcut methods in master (like $this->setFlash).
Others are missing. The question is if we should do everything with shortcut methods (+ good readable code, - duplicated code) or if we should avoid them?

Other minor issues I would fix:
- The Group delete action doesn't use HTTP DELETE instead just an unsafe GET.
- No PUT (because of compability?)
- Sometimes there are unused variables
- Comments in the Controller (I don't no how the conventions are but in my opinion controller are a lot self explaining)

Are there other things you mentioned?

I have pulled an example of a refactored controller (with shortcut methods).
When I get some feedback I would do the rest too and test it but I really require the feedback.

Regards Bodo