B
B
BonBon Slick2017-11-25 12:45:56
symfony
BonBon Slick, 2017-11-25 12:45:56

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>

Actually, it does not yet come out and neither configure nor execute commands. Also here, apparently, there is still no CRUD in the 4th generation.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
helljack, 2017-12-06
@BonBonSlick

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 question

Ask a Question

731 491 924 answers to any question