Symfony can be used to reverse-generate entities based on data, with 3.3.* as an example:
PHP bin/console doctrine:mapping:import--force appbundle xml
The first step in building an entity class from an existing database is to require doctrine to introspect the database and generate the corresponding metadata file. The metadata file describes the entity classes to be generated based on the table field.
After you have generated the metadata file, you can let doctrine build the related entity classes by executing the following command.
PHP bin/console doctrine:mapping:convert annotation./src. If this command is not responding you can try using: Php bin/console doctrine:mapping:import appbundle Annotation
The new entity class has been generated as.
Pass
PHP bin/console doctrine:generate:entities appbundle Generation method
The entity has been generated, and the following is the way to perform database operations,
You need to understand how the database operation method can be accessed: http://symfony.com/doc/3.3/doctrine.html
Symfony database Usage (ii)