|
12 | 12 |
|
13 | 13 | use Core\Application;
|
14 | 14 | use Symfony\Component\Filesystem\Filesystem;
|
15 |
| -use Symfony\Component\Console\Style\SymfonyStyle; |
16 | 15 | use Symfony\Component\Finder\Finder;
|
17 | 16 | use Yawik\Composer\Event\ConfigureEvent;
|
18 | 17 |
|
@@ -108,13 +107,13 @@ public function install($modules, $expectedMethod = null)
|
108 | 107 | }
|
109 | 108 |
|
110 | 109 | if ($method === $expectedMethod) {
|
111 |
| - $rows[] = array(sprintf('<fg=green;options=bold>%s</>', '\\' === DIRECTORY_SEPARATOR ? 'OK' : "\xE2\x9C\x94" /* HEAVY CHECK MARK (U+2714) */), $message, $method); |
| 110 | + $rows[] = array('\\' === DIRECTORY_SEPARATOR ? 'OK' : "\xE2\x9C\x94" /* HEAVY CHECK MARK (U+2714) */, $message, $method); |
112 | 111 | } else {
|
113 |
| - $rows[] = array(sprintf('<fg=yellow;options=bold>%s</>', '\\' === DIRECTORY_SEPARATOR ? 'WARNING' : '!'), $message, $method); |
| 112 | + $rows[] = array('\\' === DIRECTORY_SEPARATOR ? 'WARNING' : '!', $message, $method); |
114 | 113 | }
|
115 | 114 | } catch (\Exception $e) {
|
116 | 115 | $exitCode = 1;
|
117 |
| - $rows[] = array(sprintf('<fg=red;options=bold>%s</>', '\\' === DIRECTORY_SEPARATOR ? 'ERROR' : "\xE2\x9C\x98" /* HEAVY BALLOT X (U+2718) */), $message, $e->getMessage()); |
| 116 | + $rows[] = array('\\' === DIRECTORY_SEPARATOR ? 'ERROR' : "\xE2\x9C\x98" /* HEAVY BALLOT X (U+2718) */, $message, $e->getMessage()); |
118 | 117 | }
|
119 | 118 | }
|
120 | 119 |
|
@@ -161,23 +160,30 @@ public function getRootDir()
|
161 | 160 |
|
162 | 161 | public function renderInstallOutput($copyUsed, $rows, $exitCode)
|
163 | 162 | {
|
164 |
| - $io = new SymfonyStyle($this->getInput(), $this->getOutput()); |
165 |
| - $io->newLine(); |
| 163 | + $io = $this->getOutput(); |
| 164 | + $io->writeln(''); |
166 | 165 |
|
167 |
| - $io->section('Yawik Assets Installed!'); |
| 166 | + $io->writeln('Yawik Assets Installed!'); |
| 167 | + $io->writeln('-----------------------'); |
168 | 168 |
|
169 | 169 | if ($rows) {
|
170 |
| - $io->table(array('', 'Module', 'Method / Error'), $rows); |
| 170 | + foreach ($rows as [$check, $name, $method]) { |
| 171 | + $io->writeln("$name $check ($method)"); |
| 172 | + } |
171 | 173 | }
|
172 | 174 |
|
| 175 | + $io->writeln('-----------------------'); |
| 176 | + |
| 177 | + |
173 | 178 | if (0 !== $exitCode) {
|
174 |
| - $io->error('Some errors occurred while installing assets.'); |
| 179 | + $io->writeln('Some errors occurred while installing assets.'); |
175 | 180 | } else {
|
176 | 181 | if ($copyUsed) {
|
177 |
| - $io->note('Some assets were installed via copy. If you make changes to these assets you have to run this command again.'); |
| 182 | + $io->writeln('Some assets were installed via copy. If you make changes to these assets you have to run this command again.'); |
178 | 183 | }
|
179 |
| - $io->success($rows ? 'All assets were successfully installed.' : 'No assets were provided by any bundle.'); |
| 184 | + $io->writeln($rows ? 'All assets were successfully installed.' : 'No assets were provided by any bundle.'); |
180 | 185 | }
|
| 186 | + $io->writeln(''); |
181 | 187 | }
|
182 | 188 |
|
183 | 189 | /**
|
|
0 commit comments