updated core and modules

This commit is contained in:
Bachir Soussi Chiadmi
2017-09-09 16:27:51 +02:00
parent 027aa99b32
commit 41863f872c
7810 changed files with 318922 additions and 83631 deletions
+30 -23
View File
@@ -158,11 +158,10 @@ class Process
$this->setEnv($env);
}
$this->input = $input;
$this->setInput($input);
$this->setTimeout($timeout);
$this->useFileHandles = '\\' === DIRECTORY_SEPARATOR;
$this->pty = false;
$this->enhanceWindowsCompatibility = true;
$this->enhanceSigchildCompatibility = '\\' !== DIRECTORY_SEPARATOR && $this->isSigchildEnabled();
$this->options = array_replace(array('suppress_errors' => true, 'binary_pipes' => true), $options);
}
@@ -314,7 +313,7 @@ class Process
* @param callable|null $callback A PHP callback to run whenever there is some
* output available on STDOUT or STDERR
*
* @return Process The new process
* @return $this
*
* @throws RuntimeException When process can't be launched
* @throws RuntimeException When process is already running
@@ -389,7 +388,7 @@ class Process
*
* @param int $signal A valid POSIX signal (see http://www.php.net/manual/en/pcntl.constants.php)
*
* @return Process
* @return $this
*
* @throws LogicException In case the process is not running
* @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed
@@ -405,7 +404,7 @@ class Process
/**
* Disables fetching output and error output from the underlying process.
*
* @return Process
* @return $this
*
* @throws RuntimeException In case the process is already running
* @throws LogicException if an idle timeout is set
@@ -427,7 +426,7 @@ class Process
/**
* Enables fetching output and error output from the underlying process.
*
* @return Process
* @return $this
*
* @throws RuntimeException In case the process is already running
*/
@@ -477,10 +476,10 @@ class Process
* In comparison with the getOutput method which always return the whole
* output, this one returns the new output since the last call.
*
* @return string The process output since the last call
*
* @throws LogicException in case the output has been disabled
* @throws LogicException In case the process is not started
*
* @return string The process output since the last call
*/
public function getIncrementalOutput()
{
@@ -499,7 +498,7 @@ class Process
/**
* Clears the process output.
*
* @return Process
* @return $this
*/
public function clearOutput()
{
@@ -536,10 +535,10 @@ class Process
* whole error output, this one returns the new error output since the last
* call.
*
* @return string The process error output since the last call
*
* @throws LogicException in case the output has been disabled
* @throws LogicException In case the process is not started
*
* @return string The process error output since the last call
*/
public function getIncrementalErrorOutput()
{
@@ -558,7 +557,7 @@ class Process
/**
* Clears the process output.
*
* @return Process
* @return $this
*/
public function clearErrorOutput()
{
@@ -593,7 +592,7 @@ class Process
* This method relies on the Unix exit code status standardization
* and might not be relevant for other operating systems.
*
* @return null|string A string representation for the exit status code, null if the Process is not terminated.
* @return null|string A string representation for the exit status code, null if the Process is not terminated
*
* @see http://tldp.org/LDP/abs/html/exitcodes.html
* @see http://en.wikipedia.org/wiki/Unix_signal
@@ -881,7 +880,7 @@ class Process
*
* @param int|float|null $timeout The timeout in seconds
*
* @return self The current Process instance.
* @return self The current Process instance
*
* @throws LogicException if the output is disabled
* @throws InvalidArgumentException if the timeout is negative
@@ -911,8 +910,16 @@ class Process
if ('\\' === DIRECTORY_SEPARATOR && $tty) {
throw new RuntimeException('TTY mode is not supported on Windows platform.');
}
if ($tty && (!file_exists('/dev/tty') || !is_readable('/dev/tty'))) {
throw new RuntimeException('TTY mode requires /dev/tty to be readable.');
if ($tty) {
static $isTtySupported;
if (null === $isTtySupported) {
$isTtySupported = (bool) @proc_open('echo 1 >/dev/null', array(array('file', '/dev/tty', 'r'), array('file', '/dev/tty', 'w'), array('file', '/dev/tty', 'w')), $pipes);
}
if (!$isTtySupported) {
throw new RuntimeException('TTY mode requires /dev/tty to be read/writable.');
}
}
$this->tty = (bool) $tty;
@@ -1087,7 +1094,7 @@ class Process
throw new LogicException('Input can not be set while the process is running.');
}
$this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input);
$this->input = ProcessUtils::validateInput(__METHOD__, $input);
return $this;
}
@@ -1214,7 +1221,7 @@ class Process
return $result = false;
}
return $result = (bool) @proc_open('echo 1', array(array('pty'), array('pty'), array('pty')), $pipes);
return $result = (bool) @proc_open('echo 1 >/dev/null', array(array('pty'), array('pty'), array('pty')), $pipes);
}
/**
@@ -1265,7 +1272,7 @@ class Process
/**
* Updates the status of the process, reads pipes.
*
* @param bool $blocking Whether to use a blocking read call.
* @param bool $blocking Whether to use a blocking read call
*/
protected function updateStatus($blocking)
{
@@ -1351,8 +1358,8 @@ class Process
/**
* Reads pipes, executes callback.
*
* @param bool $blocking Whether to use blocking calls or not.
* @param bool $close Whether to close file handles or not.
* @param bool $blocking Whether to use blocking calls or not
* @param bool $close Whether to close file handles or not
*/
private function readPipes($blocking, $close)
{
@@ -1478,7 +1485,7 @@ class Process
/**
* Ensures the process is running or terminated, throws a LogicException if the process has a not started.
*
* @param string $functionName The function name that was called.
* @param string $functionName The function name that was called
*
* @throws LogicException If the process has not run.
*/
@@ -1492,7 +1499,7 @@ class Process
/**
* Ensures the process is terminated, throws a LogicException if the process has a status different than `terminated`.
*
* @param string $functionName The function name that was called.
* @param string $functionName The function name that was called
*
* @throws LogicException If the process is not yet terminated.
*/