summaryrefslogtreecommitdiff
path: root/vendor/symfony/console/Output
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/console/Output')
-rw-r--r--vendor/symfony/console/Output/BufferedOutput.php5
-rw-r--r--vendor/symfony/console/Output/ConsoleOutput.php20
-rw-r--r--vendor/symfony/console/Output/ConsoleOutputInterface.php5
-rw-r--r--vendor/symfony/console/Output/NullOutput.php12
-rw-r--r--vendor/symfony/console/Output/Output.php14
-rw-r--r--vendor/symfony/console/Output/OutputInterface.php33
-rw-r--r--vendor/symfony/console/Output/StreamOutput.php6
7 files changed, 63 insertions, 32 deletions
diff --git a/vendor/symfony/console/Output/BufferedOutput.php b/vendor/symfony/console/Output/BufferedOutput.php
index 5682fc24..8afc8931 100644
--- a/vendor/symfony/console/Output/BufferedOutput.php
+++ b/vendor/symfony/console/Output/BufferedOutput.php
@@ -16,9 +16,6 @@ namespace Symfony\Component\Console\Output;
*/
class BufferedOutput extends Output
{
- /**
- * @var string
- */
private $buffer = '';
/**
@@ -42,7 +39,7 @@ class BufferedOutput extends Output
$this->buffer .= $message;
if ($newline) {
- $this->buffer .= "\n";
+ $this->buffer .= PHP_EOL;
}
}
}
diff --git a/vendor/symfony/console/Output/ConsoleOutput.php b/vendor/symfony/console/Output/ConsoleOutput.php
index f666c793..edef356c 100644
--- a/vendor/symfony/console/Output/ConsoleOutput.php
+++ b/vendor/symfony/console/Output/ConsoleOutput.php
@@ -14,28 +14,24 @@ namespace Symfony\Component\Console\Output;
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
/**
- * ConsoleOutput is the default class for all CLI output. It uses STDOUT.
+ * ConsoleOutput is the default class for all CLI output. It uses STDOUT and STDERR.
*
- * This class is a convenient wrapper around `StreamOutput`.
+ * This class is a convenient wrapper around `StreamOutput` for both STDOUT and STDERR.
*
* $output = new ConsoleOutput();
*
* This is equivalent to:
*
* $output = new StreamOutput(fopen('php://stdout', 'w'));
+ * $stdErr = new StreamOutput(fopen('php://stderr', 'w'));
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
{
- /**
- * @var StreamOutput
- */
private $stderr;
/**
- * Constructor.
- *
* @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
* @param bool|null $decorated Whether to decorate messages (null for auto-guessing)
* @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
@@ -139,9 +135,11 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
*/
private function openOutputStream()
{
- $outputStream = $this->hasStdoutSupport() ? 'php://stdout' : 'php://output';
+ if (!$this->hasStdoutSupport()) {
+ return fopen('php://output', 'w');
+ }
- return @fopen($outputStream, 'w') ?: fopen('php://output', 'w');
+ return @fopen('php://stdout', 'w') ?: fopen('php://output', 'w');
}
/**
@@ -149,8 +147,6 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
*/
private function openErrorStream()
{
- $errorStream = $this->hasStderrSupport() ? 'php://stderr' : 'php://output';
-
- return fopen($errorStream, 'w');
+ return fopen($this->hasStderrSupport() ? 'php://stderr' : 'php://output', 'w');
}
}
diff --git a/vendor/symfony/console/Output/ConsoleOutputInterface.php b/vendor/symfony/console/Output/ConsoleOutputInterface.php
index 5eb4fc7a..b44ea7e0 100644
--- a/vendor/symfony/console/Output/ConsoleOutputInterface.php
+++ b/vendor/symfony/console/Output/ConsoleOutputInterface.php
@@ -26,10 +26,5 @@ interface ConsoleOutputInterface extends OutputInterface
*/
public function getErrorOutput();
- /**
- * Sets the OutputInterface used for errors.
- *
- * @param OutputInterface $error
- */
public function setErrorOutput(OutputInterface $error);
}
diff --git a/vendor/symfony/console/Output/NullOutput.php b/vendor/symfony/console/Output/NullOutput.php
index 682f9a4d..218f285b 100644
--- a/vendor/symfony/console/Output/NullOutput.php
+++ b/vendor/symfony/console/Output/NullOutput.php
@@ -73,21 +73,33 @@ class NullOutput implements OutputInterface
return self::VERBOSITY_QUIET;
}
+ /**
+ * {@inheritdoc}
+ */
public function isQuiet()
{
return true;
}
+ /**
+ * {@inheritdoc}
+ */
public function isVerbose()
{
return false;
}
+ /**
+ * {@inheritdoc}
+ */
public function isVeryVerbose()
{
return false;
}
+ /**
+ * {@inheritdoc}
+ */
public function isDebug()
{
return false;
diff --git a/vendor/symfony/console/Output/Output.php b/vendor/symfony/console/Output/Output.php
index 4476ffb5..371735e1 100644
--- a/vendor/symfony/console/Output/Output.php
+++ b/vendor/symfony/console/Output/Output.php
@@ -33,8 +33,6 @@ abstract class Output implements OutputInterface
private $formatter;
/**
- * Constructor.
- *
* @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
* @param bool $decorated Whether to decorate messages
* @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
@@ -94,21 +92,33 @@ abstract class Output implements OutputInterface
return $this->verbosity;
}
+ /**
+ * {@inheritdoc}
+ */
public function isQuiet()
{
return self::VERBOSITY_QUIET === $this->verbosity;
}
+ /**
+ * {@inheritdoc}
+ */
public function isVerbose()
{
return self::VERBOSITY_VERBOSE <= $this->verbosity;
}
+ /**
+ * {@inheritdoc}
+ */
public function isVeryVerbose()
{
return self::VERBOSITY_VERY_VERBOSE <= $this->verbosity;
}
+ /**
+ * {@inheritdoc}
+ */
public function isDebug()
{
return self::VERBOSITY_DEBUG <= $this->verbosity;
diff --git a/vendor/symfony/console/Output/OutputInterface.php b/vendor/symfony/console/Output/OutputInterface.php
index 9a8290bd..cddfbb49 100644
--- a/vendor/symfony/console/Output/OutputInterface.php
+++ b/vendor/symfony/console/Output/OutputInterface.php
@@ -62,6 +62,34 @@ interface OutputInterface
public function getVerbosity();
/**
+ * Returns whether verbosity is quiet (-q).
+ *
+ * @return bool true if verbosity is set to VERBOSITY_QUIET, false otherwise
+ */
+ public function isQuiet();
+
+ /**
+ * Returns whether verbosity is verbose (-v).
+ *
+ * @return bool true if verbosity is set to VERBOSITY_VERBOSE, false otherwise
+ */
+ public function isVerbose();
+
+ /**
+ * Returns whether verbosity is very verbose (-vv).
+ *
+ * @return bool true if verbosity is set to VERBOSITY_VERY_VERBOSE, false otherwise
+ */
+ public function isVeryVerbose();
+
+ /**
+ * Returns whether verbosity is debug (-vvv).
+ *
+ * @return bool true if verbosity is set to VERBOSITY_DEBUG, false otherwise
+ */
+ public function isDebug();
+
+ /**
* Sets the decorated flag.
*
* @param bool $decorated Whether to decorate the messages
@@ -75,11 +103,6 @@ interface OutputInterface
*/
public function isDecorated();
- /**
- * Sets output formatter.
- *
- * @param OutputFormatterInterface $formatter
- */
public function setFormatter(OutputFormatterInterface $formatter);
/**
diff --git a/vendor/symfony/console/Output/StreamOutput.php b/vendor/symfony/console/Output/StreamOutput.php
index 9e6b7481..51cad9b1 100644
--- a/vendor/symfony/console/Output/StreamOutput.php
+++ b/vendor/symfony/console/Output/StreamOutput.php
@@ -33,8 +33,6 @@ class StreamOutput extends Output
private $stream;
/**
- * Constructor.
- *
* @param resource $stream A stream resource
* @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
* @param bool|null $decorated Whether to decorate messages (null for auto-guessing)
@@ -85,7 +83,7 @@ class StreamOutput extends Output
*
* Colorization is disabled if not supported by the stream:
*
- * - Windows before 10.0.10586 without Ansicon, ConEmu or Mintty
+ * - Windows != 10.0.10586 without Ansicon, ConEmu or Mintty
* - non tty consoles
*
* @return bool true if the stream supports colorization, false otherwise
@@ -94,7 +92,7 @@ class StreamOutput extends Output
{
if (DIRECTORY_SEPARATOR === '\\') {
return
- 0 >= version_compare('10.0.10586', PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD)
+ '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD
|| false !== getenv('ANSICON')
|| 'ON' === getenv('ConEmuANSI')
|| 'xterm' === getenv('TERM');