I searched the Internet all day, but still no solution. I notice that many people have encountered this problem, but there is no specific answer, so here is my scenario:
I use FOSUserBundle on Symfony 3, and I created my "User Entity" in AppBundle\Entity\User. I made some corrections in some annotations in the file "User.php" and tried to update the doctrine with this command: php bin/console doctrine:schema:update --force.
I got the message " Do not update anything - your database is already synchronized with the current metadata of the object. " I also tried php bin/console doctrine:schema:update --force --completeand php bin/console doctrine:schema:update --dump-sqlreceived the same message above.
I cleared my cache, using multiple commands: php bin/console doctrine:cache:clear-metadata, bin/console cache:clear --env=dev, bin/console cache:clearand try to update again, but still got the same message.
My essence is User.php:
<?php
namespace AppBundle\Entity;
use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
Class User extends BaseUser{
protected $id;
protected $firstName;
protected $lastName;
I also added an object in AppKernel.php (and fosuserbundle too), like this
new AppBundle\AppBundle(),
new FOS\UserBundle\FOSUserBundle(),
Please, what could lead to the fact that the doctrine will not update the database ?.
thank
source
share