FOS: Friends of Symfony – FOSUserBundle or UserBundle

After installing it according to
https://github.com/FriendsOfSymfony/UserBundle/blob/master/Resources/doc/index.rst

setup swiftmailer with gmail there is a link on the cookbook

use “doctrinechema:create –dump-sql” to output the SQL used to create the schema. you will see if there is two queries to create user
and seeing the fields will help you to find the entity
btw, user is a reserved keyword in SQL so using it as table name is not totally safe (and it is a bad practice) same is true for Group, but this break the table creation

now had a problem with:

Notice: serialize(): “sessionverses” returned as member variable from __sleep() but does not exist in /home/cordoval/sites-2/memorizescripture/vendor/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php on line 136 Notice: serialize(): “chapter” returned as member variable from __sleep() but does not exist in /home/cordoval/sites-2/memorizescripture/vendor/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php on line 136

But will continue since that is just a notice.

This notice was actually pretty serious notice and it was due to the fact that I needed to implement a serialization methods for my user or session class.

2 thoughts on “FOS: Friends of Symfony – FOSUserBundle or UserBundle

    • Hi Dan,

      I think Users is ok, but looses momentum once it is a forced plural. It is better to keep that class or table name singular if it is singular, else your nomenclature is fragile.

      hope it helps.

Leave a Reply to Dan Patrick Cancel reply

Your email address will not be published. Required fields are marked *