A long time ago we saw with Symfony2 how to generate entities from the database , the only change with regard to version 3 of Symfony is that the console command ligne, instead of being
php app/console is in bin/console
today we will see how to generate a single entity from a table in Symfony3.
If you need to create another table in the database simply create and launch the commands again to generate entities and in theory will generate the entity that does not exist in the project. Indicating the commands
--filter parameter you can specify which table you are going to convert to entity in doctrine.
php bin/console doctrine:mapping:import AppBundle yml --filter="TableName"
Now we simply generate the entities with the command
php bin/console doctrine:generate:entities AppBundle --no-backup
With this way we would already have a new entity ready to work with Symfony3 and we already know how to generate a single entity from a table in Symfony3.