Open Mynyx opened 4 years ago
Here's a transcript showing the problem. In short, regenerate ONLY works with the full class name.
bin/console make:entity Foo -n
created: src/Entity/Foo.php
created: src/Repository/FooRepository.php
Next: When you're ready, create a migration with php bin/console make:migration
tac:~/maker-demo$ bin/console make:entity Foo --regenerate
[ERROR] No entities were found in the "Foo" namespace.
tac:~/maker-demo$ bin/console make:entity App\\Entity\\Foo --regenerate
no change: src/Entity/Foo.php
Success!
tac:~/maker-demo$ bin/console make:entity --regenerate
This command will generate any missing methods (e.g. getters & setters) for a class or all classes in a namespace.
To overwrite any existing methods, re-run this command with the --overwrite flag
Enter a class or namespace to regenerate [App\Entity]:
> Foo
[ERROR] No entities were found in the "Foo" namespace.
tac:~/maker-demo$ bin/console make:entity --regenerate
This command will generate any missing methods (e.g. getters & setters) for a class or all classes in a namespace.
To overwrite any existing methods, re-run this command with the --overwrite flag
Enter a class or namespace to regenerate [App\Entity]:
> App\Entity\Foo
no change: src/Entity/Foo.php
Success!
tac:~/maker-demo$
Can we just change the message ?
Enter a class (App\Entity\MyClass) or namespace to regenerate [App\Entity]:
The command
help make:entity
shows the argumentname
ofmake:entity
, which would be theClass name of the entity to create or update
.If using the command (e. g.
make:entity --regenerate VictoriousGnome
) the error message isNo entities were found in the "VictoriousGnome" namespace
.But according to
help
, the argumentname
should be the clase name and not a namespace. The help and the error message appear inconsistent.