update2
This commit is contained in:
parent
98419bd18d
commit
8a69e45efa
4919 changed files with 28311 additions and 224136 deletions
25
pfosten/vendor/symfony/process/ProcessBuilder.php
vendored
Executable file → Normal file
25
pfosten/vendor/symfony/process/ProcessBuilder.php
vendored
Executable file → Normal file
|
|
@ -11,13 +11,15 @@
|
|||
|
||||
namespace Symfony\Component\Process;
|
||||
|
||||
@trigger_error(sprintf('The %s class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the Process class instead.', ProcessBuilder::class), E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\Process\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Process\Exception\LogicException;
|
||||
|
||||
/**
|
||||
* Process builder.
|
||||
*
|
||||
* @author Kris Wallsmith <kris@symfony.com>
|
||||
*
|
||||
* @deprecated since version 3.4, to be removed in 4.0. Use the Process class instead.
|
||||
*/
|
||||
class ProcessBuilder
|
||||
{
|
||||
|
|
@ -32,8 +34,6 @@ class ProcessBuilder
|
|||
private $outputDisabled = false;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string[] $arguments An array of arguments
|
||||
*/
|
||||
public function __construct(array $arguments = array())
|
||||
|
|
@ -78,7 +78,7 @@ class ProcessBuilder
|
|||
*/
|
||||
public function setPrefix($prefix)
|
||||
{
|
||||
$this->prefix = is_array($prefix) ? $prefix : array($prefix);
|
||||
$this->prefix = \is_array($prefix) ? $prefix : array($prefix);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
@ -120,13 +120,9 @@ class ProcessBuilder
|
|||
* @param bool $inheritEnv
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @deprecated since version 3.3, to be removed in 4.0.
|
||||
*/
|
||||
public function inheritEnvironmentVariables($inheritEnv = true)
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
$this->inheritEnv = $inheritEnv;
|
||||
|
||||
return $this;
|
||||
|
|
@ -171,7 +167,7 @@ class ProcessBuilder
|
|||
/**
|
||||
* Sets the input of the process.
|
||||
*
|
||||
* @param resource|scalar|\Traversable|null $input The input content
|
||||
* @param resource|string|int|float|bool|\Traversable|null $input The input content
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
|
|
@ -221,13 +217,9 @@ class ProcessBuilder
|
|||
* @param string $value The option value
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @deprecated since version 3.3, to be removed in 4.0.
|
||||
*/
|
||||
public function setOption($name, $value)
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
$this->options[$name] = $value;
|
||||
|
||||
return $this;
|
||||
|
|
@ -266,12 +258,15 @@ class ProcessBuilder
|
|||
*/
|
||||
public function getProcess()
|
||||
{
|
||||
if (0 === count($this->prefix) && 0 === count($this->arguments)) {
|
||||
if (0 === \count($this->prefix) && 0 === \count($this->arguments)) {
|
||||
throw new LogicException('You must add() command arguments before calling getProcess().');
|
||||
}
|
||||
|
||||
$arguments = array_merge($this->prefix, $this->arguments);
|
||||
$process = new Process($arguments, $this->cwd, $this->env, $this->input, $this->timeout, $this->options);
|
||||
// to preserve the BC with symfony <3.3, we convert the array structure
|
||||
// to a string structure to avoid the prefixing with the exec command
|
||||
$process->setCommandLine($process->getCommandLine());
|
||||
|
||||
if ($this->inheritEnv) {
|
||||
$process->inheritEnvironmentVariables();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue