Skip to content

"make:command" leads into "Could not determine where to locate the new class" #231

Closed
@SebTM

Description

@SebTM

I'm trying to get maker working with a new Symfony 4.1 installation. I've created it using composer, changed the "App"-Namespace to "MakerTest" (see composer.json) and configures maker to use "MakerTest" as root-namespace.

composer.json:

    "autoload": {
        "psr-4": {
            "MakerTest\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "MakerTest\\Tests\\": "tests/"
        }
    },

config/packages/maker.yaml:

maker:
  root_namespace: MakerTest

Output:

root@xyz:/var/www/# bc make:command

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

 Choose a command name (e.g. app:delicious-chef):
 > create-user


In Generator.php line 43:

  Could not determine where to locate the new class "MakerTest\Command\CreateUserCommand", maybe try with a full namespace like "\My\Full\Namespace\CreateUserCommand"


make:command [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<name>]

Tried it with latest stable and also dev-master - same issue with both.

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