I've seen many people trying to use FOSUserBundle.
I've been struggling with it for 6 hours now. Just to be able to make a custom user registration form. The basic documentation is 6 pages long: basic. Here are all the drawbacks of using FOSUserBundle, from my point of view:
fos_user
. So you have to base all your code on your user
entity, which a child of BaseUser
. If your database follows a convention (like wordpress does, with all tables beginning with wp_
) this breaks your convention.So I'm just wondering: what is the point of using if FOSUserBundle? If I've already done a registration process that follows the very basic things explained in Symfony help (forms, form validation, and sessions) and I just copy paste my code, this is, from my point of view, far faster than installing, configuring, inheriting, modifying and so on the FOSUserBundle.
Knowing what I've done, what are the advantages of FOSUserBundle? What could make me change and take some more hours to make it work with my project, instead of re-using my (forms, form validation, and sessions) from another project?
Well, your question sounds more like a rant, but you got some points.
In my opinion, the main problem of the FOSUserBundle
as well as a lot of Bundle in the community, is that they try to make it customizable, generic, re-usable, whatever.
The goal is fair, but in reality it often leads to not human friendly code. Most of the time, you will take much more time to "get it done" using community bundle than making your own (see Sonata bundles).
I don't say they are bad bundles, not at all, but they deserve different purposes.
For me such bundles may help newcomers to have a quick implementation, to get things done, and in the case of a Rapid Application Development, it may be really easy to get a fully working application with all the registration process done.
But most of the time, you realize that using third party codes ties you too much to their own concept and that is wrong.
In comparison, I do like very much the npm community, there are A LOT of little package with one function which you can easily integrate, in the same way, I try, to favor library instead of bundle when I want to release an open source project. The point is the framework implementation is free of any concept or philosophy and easily integrate in an existing project.
I remember some early days where I had to play with Joomla, Drupal, Wordpress, whatever, it was the "plugin/extension/module" fashion, in the same way that we often hear "there is a bundle for that", some people, or company just want to get it done, no matter the quality, the future of the application because it already have been sold.
To conclude, such bundles can greatly help and speed up development process, but be careful, if you have custom requirements, performance implication, etc. don't use them, however if you only want to a quick proof of concept, or a simple application, it is worth.
This is a fiction story based on my own experience and failures using it :)
I know this is an old post but as search engines keep indexing this...
FYI FOSUserBundle has been discontinued and is of no use in Symfony 4 and 5...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With