I have a project in Symfony 2.1, with PropelBundle and FOS UserBundle. I updated the FOS UserBundle using Composer from 1.2 to the latest version (2.0) and followed the instructions to remove the definition of "propel_user_class" in the app / config / config.yml file, as indicated in the Upgrade.md file . My new configuration is as follows:
# FOSUserBundle Configuration fos_user: db_driver: propel firewall_name: main user_class: MyVendor\MyBundle\Model\Member registration: form: type: myvendor_user_registration
After that, and when restoring the model, I get the following error when sending the user login form: "The provider must return the UserInterface object."
I think there is a problem with the FOS UserBundle not recognizing my user class "Member" and its properties. In the previous version of FOS / UserBundle (1.2), FOS \ UserBundle \ Model \ UserInterface was implemented by a proxy object , so my previous configuration (which was working) included the following:
user_class: MyVendor\MyBundle\FOSUserBundle\Propel\UserProxy propel_user_class: MyVendor\MyBundle\Model\Member
My UserProxy.php file is used to extend FOS \ UserBundle \ Propel \ UserProxy and add properties specific to my project. Is this UserProxy.php no longer needed with the new version of UserBundle? What else do I need to do to make the new version of UserBundle work? The aforementioned Upgrade.md file also indicates that the profile form no longer wraps the user in the CheckPassword class, and token generation is no longer performed by the User class anymore. However, I am not sure if I should make any changes because of this? Can someone give me some recommendations? thanks in advanced ...
UPDATE: I tried to transfer the class definition of the Member, Circle, and MemberCircle classes to the /Resources/FOSUserBundle/config/propel/schema.xml application to override the schema inside the FOS User Bundle, as stated in the documentation, telling the classes in my own package to expand them in the FOS UserBundle, but I get the following error when trying to build a model using "app / console propel: build":
[RuntimeException]
"MyProjectName / application / Resources / FOSUserBundle / configuration / movement / schema.xml" the resource is hidden by the resource from the "MyBundle" derived bundle. Create a "MyProjectName / application / Resources / MyBundle / configuration / movement / schema.xml" file to override the bundle resource.
I saved the namespace "FOS \ UserBundle \ Propel" in the file app / Resources / FOSUserBundle / config / propel / schema.xml. How can I make this scheme overridden in FOS / UserBundle? Can I use classes with the names "Member" (for the user) and "Circle" (for the group)? Any help would be appreciated ...