I have a Symfony2 project with FOSUserBundle and SonataUserBundle. Both packages are configured to use ORM only.
fos_user:
db_driver: orm
firewall_name: main
user_class: MyBundle\Entity\User
group:
group_class: MyBundle\Entity\Group
from_email:
address: foo@bar.com
sender_name: Foo Bar
sonata_user:
security_acl: false
manager_type: orm
class:
user: MyBundle\Entity\User
group: MyBundle\Entity\Group
impersonating:
route: homepage
admin:
user:
class: MyBundle\Admin\UserAdmin
controller: SonataAdminBundle:CRUD
translation: SonataUserBundle
But when I want to use my User class, an error occurs saying that MongoDB annotation classes cannot be found.
Trying to load the Unique class from the namespace \ Symfony \ Component \ Validator \ Constraints \ Doctrine \ Bundle \ MongoDBBundle \\ Verifier Constraints. Did you forget the "use" operator for another namespace?
This post seems to be selected
/friendsofsymfony/user-bundle/FOS/UserBundle/Resources/config/validation/mongodb.xml
As I did not want to use the MongoDB drivers, why does FOSUser use the MongoDB validator?