updated packages
This commit is contained in:
14
vendor/symfony/process/Pipes/AbstractPipes.php
vendored
14
vendor/symfony/process/Pipes/AbstractPipes.php
vendored
@@ -20,7 +20,7 @@ use Symfony\Component\Process\Exception\InvalidArgumentException;
|
||||
*/
|
||||
abstract class AbstractPipes implements PipesInterface
|
||||
{
|
||||
public $pipes = array();
|
||||
public $pipes = [];
|
||||
|
||||
private $inputBuffer = '';
|
||||
private $input;
|
||||
@@ -49,7 +49,7 @@ abstract class AbstractPipes implements PipesInterface
|
||||
foreach ($this->pipes as $pipe) {
|
||||
fclose($pipe);
|
||||
}
|
||||
$this->pipes = array();
|
||||
$this->pipes = [];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,8 +117,8 @@ abstract class AbstractPipes implements PipesInterface
|
||||
}
|
||||
}
|
||||
|
||||
$r = $e = array();
|
||||
$w = array($this->pipes[0]);
|
||||
$r = $e = [];
|
||||
$w = [$this->pipes[0]];
|
||||
|
||||
// let's have a look if something changed in streams
|
||||
if (false === @stream_select($r, $w, $e, 0, 0)) {
|
||||
@@ -130,7 +130,7 @@ abstract class AbstractPipes implements PipesInterface
|
||||
$written = fwrite($stdin, $this->inputBuffer);
|
||||
$this->inputBuffer = substr($this->inputBuffer, $written);
|
||||
if (isset($this->inputBuffer[0])) {
|
||||
return array($this->pipes[0]);
|
||||
return [$this->pipes[0]];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ abstract class AbstractPipes implements PipesInterface
|
||||
if (isset($data[0])) {
|
||||
$this->inputBuffer = $data;
|
||||
|
||||
return array($this->pipes[0]);
|
||||
return [$this->pipes[0]];
|
||||
}
|
||||
}
|
||||
if (feof($input)) {
|
||||
@@ -164,7 +164,7 @@ abstract class AbstractPipes implements PipesInterface
|
||||
fclose($this->pipes[0]);
|
||||
unset($this->pipes[0]);
|
||||
} elseif (!$w) {
|
||||
return array($this->pipes[0]);
|
||||
return [$this->pipes[0]];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
44
vendor/symfony/process/Pipes/UnixPipes.php
vendored
44
vendor/symfony/process/Pipes/UnixPipes.php
vendored
@@ -48,34 +48,34 @@ class UnixPipes extends AbstractPipes
|
||||
if (!$this->haveReadSupport) {
|
||||
$nullstream = fopen('/dev/null', 'c');
|
||||
|
||||
return array(
|
||||
array('pipe', 'r'),
|
||||
return [
|
||||
['pipe', 'r'],
|
||||
$nullstream,
|
||||
$nullstream,
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
if ($this->ttyMode) {
|
||||
return array(
|
||||
array('file', '/dev/tty', 'r'),
|
||||
array('file', '/dev/tty', 'w'),
|
||||
array('file', '/dev/tty', 'w'),
|
||||
);
|
||||
return [
|
||||
['file', '/dev/tty', 'r'],
|
||||
['file', '/dev/tty', 'w'],
|
||||
['file', '/dev/tty', 'w'],
|
||||
];
|
||||
}
|
||||
|
||||
if ($this->ptyMode && Process::isPtySupported()) {
|
||||
return array(
|
||||
array('pty'),
|
||||
array('pty'),
|
||||
array('pty'),
|
||||
);
|
||||
return [
|
||||
['pty'],
|
||||
['pty'],
|
||||
['pty'],
|
||||
];
|
||||
}
|
||||
|
||||
return array(
|
||||
array('pipe', 'r'),
|
||||
array('pipe', 'w'), // stdout
|
||||
array('pipe', 'w'), // stderr
|
||||
);
|
||||
return [
|
||||
['pipe', 'r'],
|
||||
['pipe', 'w'], // stdout
|
||||
['pipe', 'w'], // stderr
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,7 +83,7 @@ class UnixPipes extends AbstractPipes
|
||||
*/
|
||||
public function getFiles()
|
||||
{
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,18 +94,18 @@ class UnixPipes extends AbstractPipes
|
||||
$this->unblock();
|
||||
$w = $this->write();
|
||||
|
||||
$read = $e = array();
|
||||
$read = $e = [];
|
||||
$r = $this->pipes;
|
||||
unset($r[0]);
|
||||
|
||||
// let's have a look if something changed in streams
|
||||
set_error_handler(array($this, 'handleError'));
|
||||
set_error_handler([$this, 'handleError']);
|
||||
if (($r || $w) && false === stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) {
|
||||
restore_error_handler();
|
||||
// if a system call has been interrupted, forget about it, let's try again
|
||||
// otherwise, an error occurred, let's reset pipes
|
||||
if (!$this->hasSystemCallBeenInterrupted()) {
|
||||
$this->pipes = array();
|
||||
$this->pipes = [];
|
||||
}
|
||||
|
||||
return $read;
|
||||
|
||||
34
vendor/symfony/process/Pipes/WindowsPipes.php
vendored
34
vendor/symfony/process/Pipes/WindowsPipes.php
vendored
@@ -26,13 +26,13 @@ use Symfony\Component\Process\Process;
|
||||
*/
|
||||
class WindowsPipes extends AbstractPipes
|
||||
{
|
||||
private $files = array();
|
||||
private $fileHandles = array();
|
||||
private $lockHandles = array();
|
||||
private $readBytes = array(
|
||||
private $files = [];
|
||||
private $fileHandles = [];
|
||||
private $lockHandles = [];
|
||||
private $readBytes = [
|
||||
Process::STDOUT => 0,
|
||||
Process::STDERR => 0,
|
||||
);
|
||||
];
|
||||
private $haveReadSupport;
|
||||
|
||||
public function __construct($input, bool $haveReadSupport)
|
||||
@@ -44,10 +44,10 @@ class WindowsPipes extends AbstractPipes
|
||||
// Workaround for this problem is to use temporary files instead of pipes on Windows platform.
|
||||
//
|
||||
// @see https://bugs.php.net/bug.php?id=51800
|
||||
$pipes = array(
|
||||
$pipes = [
|
||||
Process::STDOUT => Process::OUT,
|
||||
Process::STDERR => Process::ERR,
|
||||
);
|
||||
];
|
||||
$tmpDir = sys_get_temp_dir();
|
||||
$lastError = 'unknown reason';
|
||||
set_error_handler(function ($type, $msg) use (&$lastError) { $lastError = $msg; });
|
||||
@@ -98,21 +98,21 @@ class WindowsPipes extends AbstractPipes
|
||||
if (!$this->haveReadSupport) {
|
||||
$nullstream = fopen('NUL', 'c');
|
||||
|
||||
return array(
|
||||
array('pipe', 'r'),
|
||||
return [
|
||||
['pipe', 'r'],
|
||||
$nullstream,
|
||||
$nullstream,
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
// We're not using pipe on Windows platform as it hangs (https://bugs.php.net/bug.php?id=51800)
|
||||
// We're not using file handles as it can produce corrupted output https://bugs.php.net/bug.php?id=65650
|
||||
// So we redirect output within the commandline and pass the nul device to the process
|
||||
return array(
|
||||
array('pipe', 'r'),
|
||||
array('file', 'NUL', 'w'),
|
||||
array('file', 'NUL', 'w'),
|
||||
);
|
||||
return [
|
||||
['pipe', 'r'],
|
||||
['file', 'NUL', 'w'],
|
||||
['file', 'NUL', 'w'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,7 +130,7 @@ class WindowsPipes extends AbstractPipes
|
||||
{
|
||||
$this->unblock();
|
||||
$w = $this->write();
|
||||
$read = $r = $e = array();
|
||||
$read = $r = $e = [];
|
||||
|
||||
if ($blocking) {
|
||||
if ($w) {
|
||||
@@ -186,6 +186,6 @@ class WindowsPipes extends AbstractPipes
|
||||
flock($this->lockHandles[$type], LOCK_UN);
|
||||
fclose($this->lockHandles[$type]);
|
||||
}
|
||||
$this->fileHandles = $this->lockHandles = array();
|
||||
$this->fileHandles = $this->lockHandles = [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user