updated packages

This commit is contained in:
2019-05-18 09:06:43 +00:00
parent 901d16349e
commit e9487fa58a
2025 changed files with 30366 additions and 49653 deletions

View File

@@ -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 = [];
}
}