From 5b124742fbfbebd006bf023faf0c6adb64f48e75 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 22 Sep 2016 02:33:51 -0700 Subject: [PATCH] Backs out #396: Remove --supress-messages. For the casual Robo user, this option is not sufficiently different than --quiet. Applications that wish to alter the way that Robo handles status messages should override Robo's default container as described in docs/framework.md. --- src/Application.php | 4 ---- src/Common/TaskIO.php | 2 +- src/Config.php | 12 ------------ 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/Application.php b/src/Application.php index 85b7dd278..6640563e5 100644 --- a/src/Application.php +++ b/src/Application.php @@ -21,10 +21,6 @@ public function __construct($name, $version) ->addOption( new InputOption('--progress-delay', null, InputOption::VALUE_REQUIRED, 'Number of seconds before progress bar is displayed in long-running task collections. Default: 2s.', Config::DEFAULT_PROGRESS_DELAY) ); - $this->getDefinition() - ->addOption( - new InputOption('--supress-messages', null, InputOption::VALUE_NONE, 'Supress all Robo TaskIO messages.') - ); } public function addInitRoboFileCommand($roboFile, $roboClass) diff --git a/src/Common/TaskIO.php b/src/Common/TaskIO.php index 32f6fef44..f2072c157 100644 --- a/src/Common/TaskIO.php +++ b/src/Common/TaskIO.php @@ -114,7 +114,7 @@ protected function printTaskDebug($text, $context = null) protected function printTaskOutput($level, $text, $context) { $logger = $this->logger(); - if (($this->getConfig() && $this->getConfig()->isSupressed()) || !$logger) { + if (!$logger) { return; } // Hide the progress indicator, if it is visible. diff --git a/src/Config.php b/src/Config.php index 32ab62343..e6ca897f3 100644 --- a/src/Config.php +++ b/src/Config.php @@ -6,7 +6,6 @@ class Config const PROGRESS_BAR_AUTO_DISPLAY_INTERVAL = 'progress-delay'; const DEFAULT_PROGRESS_DELAY = 2; const SIMULATE = 'simulate'; - const SUPRESS_MESSAGES = 'supress-messages'; const DECORATED = 'decorated'; protected $config = []; @@ -48,7 +47,6 @@ public function getGlobalOptionDefaultValues() [ self::PROGRESS_BAR_AUTO_DISPLAY_INTERVAL => self::DEFAULT_PROGRESS_DELAY, self::SIMULATE => false, - self::SUPRESS_MESSAGES => false, ]; return $globalOptions; @@ -86,16 +84,6 @@ public function setDecorated($decorated = true) return $this->set(self::DECORATED, $decorated); } - public function isSupressed() - { - return $this->get(self::SUPRESS_MESSAGES); - } - - public function setSupressed($supressed = true) - { - return $this->set(self::SUPRESS_MESSAGES, $supressed); - } - public function setProgressBarAutoDisplayInterval($interval) { return $this->set(self::PROGRESS_BAR_AUTO_DISPLAY_INTERVAL, $interval);