From 204cd739d34ad2c062d68802aa4c87ddb0dc24c4 Mon Sep 17 00:00:00 2001 From: Tito Costa Date: Thu, 25 Jun 2020 12:05:17 +0200 Subject: [PATCH] added info method to symfony style --- src/Symfony/Component/Console/Style/SymfonyStyle.php | 8 ++++++++ .../Fixtures/Style/SymfonyStyle/command/command_2.php | 1 + .../Tests/Fixtures/Style/SymfonyStyle/output/output_2.txt | 2 ++ 3 files changed, 11 insertions(+) diff --git a/src/Symfony/Component/Console/Style/SymfonyStyle.php b/src/Symfony/Component/Console/Style/SymfonyStyle.php index 271752f144..290d6d55ec 100644 --- a/src/Symfony/Component/Console/Style/SymfonyStyle.php +++ b/src/Symfony/Component/Console/Style/SymfonyStyle.php @@ -163,6 +163,14 @@ class SymfonyStyle extends OutputStyle $this->block($message, 'NOTE', 'fg=yellow', ' ! '); } + /** + * {@inheritdoc} + */ + public function info($message) + { + $this->block($message, 'INFO', 'fg=green', ' ', true); + } + /** * {@inheritdoc} */ diff --git a/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php b/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php index 791b626f24..a16ad505d2 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php +++ b/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php @@ -12,5 +12,6 @@ return function (InputInterface $input, OutputInterface $output) { $output->error('Error'); $output->success('Success'); $output->note('Note'); + $output->info('Info'); $output->block('Custom block', 'CUSTOM', 'fg=white;bg=green', 'X ', true); }; diff --git a/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_2.txt b/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_2.txt index ca609760cc..9513b862f7 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_2.txt +++ b/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_2.txt @@ -9,5 +9,7 @@ ! [NOTE] Note + [INFO] Info + X [CUSTOM] Custom block