0
votes

i try to add new property i read this guide https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/overriding_forms.md Overriding Default FOSUserBundle Forms

all are good only return to me this error Neither property "name" nor method "getName()" nor method "isName()" exists in class "Application\Sonata\UserBundle\Entity\User"

probably Sonata not read the new property

how i can resolve? thx

1
in your new entity class you need to extend BaseUser. did you try that? - Mike
yes, the problem is this i have install fosuserbundle, after i have install sonatauserbundle all work after i decide to add, to entity User(Acme/UserBundle/Entity/User.php) the new property "name" i have add, but sonata want gettere and setter in "Application\Sonata\UserBundle\Entity\User - Mark Cibor
Hi Mark, did you include the right namespace for the User Entity in your controller? (e.g. use Acme\UserBundle\Entity\User) - Mike

1 Answers

1
votes

Make sure that Application\Sonata\UserBundle\Entity\User class extends your bundle's user class, but not FOS\UserBundle\Entity\User.