Answer the question
In order to leave comments, you need to log in
Symfony 4 Entity generation?
php bin/console doctrine:generate:entities TestEntity
Generating entities for namespace "TestEntity"
2017-11-25T09:43:57+00:00 [error] Error thrown while running command "doctrine:generate:entities TestEntity". Message: "Namespace "TestEntity" does not contain any mapped entities."
In DisconnectedMetadataFactory.php line 103:
Namespace "TestEntity" does not contain any mapped entities.
doctrine:generate:entities [--path PATH] [--no-backup] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> <name>
Answer the question
In order to leave comments, you need to log in
In Symfony 4, a component for generating entity, bundle, form, controller, etc. taken out of the application
To install it, run
composer require maker
After that, when you run the bin/console list command, you will see
make:auth Creates an empty Guard authenticator
make:command Creates a new console command class
make:controller Creates a new controller class
make:entity Creates a new Doctrine entity class
make:form Creates a new form class
make:functional-test Creates a new functional test class
make:serializer:encoder Creates a new serializer encoder class
make:subscriber Creates a new event subscriber class
make:twig-extension Creates a new Twig extension class
make:unit-test Creates a new unit test class
make:validator Creates a new validator and constraint class
make:voter Creates a new security voter class
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question