Skip to content

[Console] calling_commands: the example is wrong since SymfonyStyle #21354

@MacDada

Description

@MacDada

The example does not work, since there is no shown getApplication method:

https://github.com/symfony/symfony-docs/blob/7.3/console/calling_commands.rst?plain=1#L40

It used to "work" before, as the CreateUserCommand used to extend Command:
0546a2c#r165314121

I don't know how to fix the example without extending Command. Is there a way to inject the Application somehow?

I would suggest to revert this example a bit back to "old style" by extending Command again. I can do the PR.

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