Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[RFC] (Console) Add a second style (besides SymfonyStyle) #58714

Copy link
Copy link
Open
@dsentker

Description

@dsentker
Issue body actions

Description

The SymfonyStyle has helped us for years to display messages and other information nicely in the console. However, the formatting of various events, e.g. "success", could also be displayed differently.

In my opinion, more text is easier to read if it is not highlighted in color. One solution is to use the color scheme only for the outline of the block. A positive side effect is a sleek and modern output. Here is an Example:

protected function execute(InputInterface $input, OutputInterface $output): int
{
    $outlineStyle = new OutlineStyle($input, $output);
    $outlineStyle->box('Hello World');
    $outlineStyle->box('A title for this box is also possible', 'Title here');
    $outlineStyle->success('This is a multiline demo message to demonstrate how the text behaves across multiple lines with different message boxes.');
    $outlineStyle->error('This is a multiline demo message to demonstrate how the text behaves across multiple lines with different message boxes.');
    $outlineStyle->warning('This is a multiline demo message to demonstrate how the text behaves across multiple lines with different message boxes.');
    $outlineStyle->note('This is a multiline demo message to demonstrate how the text behaves across multiple lines with different message boxes.');
}

I played around a bit and I think the result is pretty neat.

I therefore suggest adding this second style to the Console component as well.

Example

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConsoleRFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.