I am trying to debug the error "Fatal error: Cannot redeclare class Acme\UserBundle\Entity\User in C:\wamp\www\Symfony\src\Acme\UserBundle\entity\User.php on line 15" in my command window when I want to create Mysql tables using the Doctrine command "php app/console doctrine:schema:update --force".
Here is the top of my entity code:
namespace Acme\UserBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* Acme\UserBundle\Entity\User
*
* @ORM\Table(name="acme_users")
* @ORM\Entity(repositoryClass="Acme\UserBundle\Entity\UserRepository")
*/
class User implements UserInterface, \Serializable
{
//...
To see where I could have double-declared my "User" class, I have renamed in into "User_alias" and cleared my cache (using the "php app/console cache:clear" command). The command window gives me then the error "The table with name 'basededonne.acme_users' already exists.'. However, I do not see this table in phpmyadmin. In addition, my browser gives me the error "FatalErrorException in User.php line 15: Compile Error: Cannot redeclare class Acme\UserBundle\Entity\User_alias" (I did not have error in my browser when I used the "User" class).
Could anyone give me some other options to explore to resolve this issue? There is a bigger picture that I am currently missing I guess.