Q:

Symfony error when i copy my project

I'm working on a project using Symfony 2.6 and Sonata Admin Bundle.
It works on my computer (win10 - wamp - mysql) but when i copy it on another computer with same configuration (win10 - wamp - mysql).
It return for every class in sonata admin : No entity manager defined for class "xxx"

I do not figure out what's the error since nothing change between the version on my computer and the one on the other computer. i'm searching since 1 week and found no solution for my problem..
all helps would be welcome
ps : i found that when i run the following command :"php app/console doctrine:mapping:info"
My Bundle "AppBundle" isn't listed in the mapping.
see:
How do i map my AppBundle for this ?
Following command : "php app/console doctrine:generate:entities AppBundle"
return me this :
"Bundle "AppBundle" does not contain any mapped entities."

A:

Try the following commands, but before running the third one you should copy your entities files (not sure if an automatic copy is generated for each entity), because in case there is some custom method/property in it, this will maybe overwrite them.

php app/console doctrine:mapping:import --force AppBundle yml
php app/console doctrine:mapping:convert annotation ./src --force
php app/console doctrine:generate:entities AppBundle

