Skip to content

make:entity argument name #555

@Mynyx

Description

@Mynyx

The command help make:entity shows the argument name of make:entity, which would be the Class name of the entity to create or update.

If using the command (e. g. make:entity --regenerate VictoriousGnome) the error message is No entities were found in the "VictoriousGnome" namespace.

But according to help, the argument name should be the clase name and not a namespace. The help and the error message appear inconsistent.

$ php bin/console help make:entity
Usage:
  make:entity [options] [--] [<name>]

Arguments:
  name                  Class name of the entity to create or update (e.g. VictoriousGnome)

Options:
  -a, --api-resource    Mark this class as an API Platform resource (expose a CRUD API for it)
      --regenerate      Instead of adding new fields, simply generate the methods (e.g. getter/setter) for existing fields
      --overwrite       Overwrite any existing getter/setter methods
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -e, --env=ENV         The Environment name. [default: "dev"]
      --no-debug        Switches off debug mode.
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

[...]
$ php bin/console make:entity --regenerate VictoriousGnome

 ! [NOTE] It looks like your app may be using a namespace other than "AppBundle".
 !
 !        To configure this and make your life easier, see:
 !        https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html#configuration



 [ERROR] No entities were found in the "VictoriousGnome" namespace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions