Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Open
Description
Description
TheSymfonyStyle 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:
protectedfunctionexecute(InputInterface$input,OutputInterface$output):int{$outlineStyle =newOutlineStyle($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.