Skip to content

[RFC][3.0] Enhancing the Console component #10639

@wouterj

Description

@wouterj

In 3.0, we want to use DI better for the Console component. The main problem for this is that the Command class handles the definition of the command as well as the execution. This should be splitted.

When thinking about this, I got a new idea which means that we should completely refactor the Console component. We should make it more consistent with the HttpFoundation story.

When executing a command, it is a CliRequest (ConsoleRequest, ...). This should be handled by a ConsoleRouter, which loads the console routing files with the definitions of the commands. The command will be nothing more than a normal controller, except that it retrieves a CliRequest and returns a CliResponse.

This will get some issues with interacting with the console. But as long as the controller uses helpers to do that, I don't think it will be much of a problem. Honestly, this idea isn't 100% good right now and it needs a lot of discussion and tweaking to get it correct, but I just wanted to get some responses to this idea :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions