3
3
4
4
use Somnambulist \ProjectManager \Application ;
5
5
use Somnambulist \ProjectManager \Kernel ;
6
+ use Symfony \Component \Console \Formatter \OutputFormatter ;
6
7
use Symfony \Component \Console \Formatter \OutputFormatterStyle ;
7
8
use Symfony \Component \Console \Input \ArgvInput ;
8
9
use Symfony \Component \Console \Output \ConsoleOutput ;
@@ -15,14 +16,17 @@ set_time_limit(0);
15
16
16
17
require dirname (__DIR__ ) . '/vendor/autoload.php ' ;
17
18
19
+ $ formatter = new OutputFormatter (false , [
20
+ 'ok ' => new OutputFormatterStyle ('white ' , 'green ' , ['bold ' ]),
21
+ 'err ' => new OutputFormatterStyle ('white ' , 'red ' , ['bold ' ]),
22
+ 'step ' => new OutputFormatterStyle ('white ' , 'blue ' , ['bold ' ]),
23
+ 'q ' => new OutputFormatterStyle ('white ' , 'cyan ' , ['bold ' ]),
24
+ 'warn ' => new OutputFormatterStyle ('white ' , 'yellow ' , ['bold ' ]),
25
+ 'i ' => new OutputFormatterStyle ('white ' , 'magenta ' , ['bold ' ]),
26
+ ]);
27
+
18
28
$ input = new ArgvInput ();
19
- $ output = new ConsoleOutput ();
20
- $ output ->getFormatter ()->setStyle ('ok ' , new OutputFormatterStyle ('white ' , 'green ' , ['bold ' ]));
21
- $ output ->getFormatter ()->setStyle ('err ' , new OutputFormatterStyle ('white ' , 'red ' , ['bold ' ]));
22
- $ output ->getFormatter ()->setStyle ('step ' , new OutputFormatterStyle ('white ' , 'blue ' , ['bold ' ]));
23
- $ output ->getFormatter ()->setStyle ('q ' , new OutputFormatterStyle ('white ' , 'cyan ' , ['bold ' ]));
24
- $ output ->getFormatter ()->setStyle ('warn ' , new OutputFormatterStyle ('white ' , 'yellow ' , ['bold ' ]));
25
- $ output ->getFormatter ()->setStyle ('i ' , new OutputFormatterStyle ('white ' , 'magenta ' , ['bold ' ]));
29
+ $ output = new ConsoleOutput (ConsoleOutput::VERBOSITY_NORMAL , null , $ formatter );
26
30
27
31
require dirname (__DIR__ ) . '/config/bootstrap.php ' ;
28
32
0 commit comments