Skip to content

Upgrade make:command to create an invokable command, and ask arguments and options #1699

Open
@GromNaN

Description

@GromNaN

The Invokable command feature is landing in Symfony 7.3, this is improving the DX with the resolution of the callable parameters. For new applications, the maker should generate the command class using this new syntax.

Currently, MakeCommand generates the command class from its name only. We can make the command more interactive and ask for the parameter and options, to generate the full command definition: the signature of the __invoke method with #[Argument] and #[Option] attributes).

@tacman wrote an implementation that is presented in this article: Generating Symfony 7.3 Console Commands

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