I'm extending my own User class from FOS\UserBundle\Model\User. I'm using src/AppBundle/Resources/config/doctrine/User.orm.yml for mappings. When I regenerate the entity with bin/console make:entity --regenerate in my file AppBundle/Entity/User.php new getters and setters for fields like email and group appear(These two fields belong to the parent class).
If I make new changes to my entity in the yml mapping and execute bin/console make:entity --regenerate I get the following error:
Fatal Compile Error: Access level to AppBundle\Entity\User::$email must be protected (as in class FOS\UserBundle\Model\User) or weaker
When I used bin/console doctrine:generate:entities, which is now deprecated, parent fields weren't mentioned in child classes. Could you help me?
I don't think make:entity --regenerate was implemented with inheritance in mind, and so it might fail to detect that the method is there in the parent class.
I'm extending my own User class from FOS\UserBundle\Model\User. I'm using
src/AppBundle/Resources/config/doctrine/User.orm.yml
for mappings. When I regenerate the entity withbin/console make:entity --regenerate
in my file AppBundle/Entity/User.php new getters and setters for fields like email and group appear(These two fields belong to the parent class).If I make new changes to my entity in the yml mapping and execute
bin/console make:entity --regenerate
I get the following error:When I used
bin/console doctrine:generate:entities
, which is now deprecated, parent fields weren't mentioned in child classes. Could you help me?