Wednesday, April 04, 2012

FOSUserBundle fos UserBundle\Entity\User is not a valid entity or mapped super class

a common problem on installing FOS followed by the official instruction is

UserBundle\Entity\User is not a valid entity or mapped super class


this is because you need generate the UserBundle first in

Step 4: Create your User class


it's recommended use command to generate the bundle


php app/console generate:bundle --namespace=Acme/UserBundle



NOTE:

Step 4: Create your User class


is not simply just create the user.php file in place and paste the content from instruction

you need create the entire UserBundle

More than 3 requests, I'll translate this to Chinese.
超过3个请求,我就会把这篇文章翻译成中文。

No comments: