Update to Drupal 8.2.6. For more information, see https://www.drupal.org/project/drupal/releases/8.2.6
This commit is contained in:
parent
db56c09587
commit
f1e72395cb
588 changed files with 26857 additions and 2777 deletions
50
vendor/symfony/console/Command/Command.php
vendored
50
vendor/symfony/console/Command/Command.php
vendored
|
@ -205,8 +205,6 @@ class Command
|
|||
*
|
||||
* @return int The command exit code
|
||||
*
|
||||
* @throws \Exception
|
||||
*
|
||||
* @see setCode()
|
||||
* @see execute()
|
||||
*/
|
||||
|
@ -232,7 +230,14 @@ class Command
|
|||
|
||||
if (null !== $this->processTitle) {
|
||||
if (function_exists('cli_set_process_title')) {
|
||||
cli_set_process_title($this->processTitle);
|
||||
if (false === @cli_set_process_title($this->processTitle)) {
|
||||
if ('Darwin' === PHP_OS) {
|
||||
$output->writeln('<comment>Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.</comment>');
|
||||
} else {
|
||||
$error = error_get_last();
|
||||
trigger_error($error['message'], E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
} elseif (function_exists('setproctitle')) {
|
||||
setproctitle($this->processTitle);
|
||||
} elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) {
|
||||
|
@ -270,7 +275,7 @@ class Command
|
|||
*
|
||||
* @param callable $code A callable(InputInterface $input, OutputInterface $output)
|
||||
*
|
||||
* @return Command The current instance
|
||||
* @return $this
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*
|
||||
|
@ -285,7 +290,15 @@ class Command
|
|||
if (PHP_VERSION_ID >= 50400 && $code instanceof \Closure) {
|
||||
$r = new \ReflectionFunction($code);
|
||||
if (null === $r->getClosureThis()) {
|
||||
$code = \Closure::bind($code, $this);
|
||||
if (PHP_VERSION_ID < 70000) {
|
||||
// Bug in PHP5: https://bugs.php.net/bug.php?id=64761
|
||||
// This means that we cannot bind static closures and therefore we must
|
||||
// ignore any errors here. There is no way to test if the closure is
|
||||
// bindable.
|
||||
$code = @\Closure::bind($code, $this);
|
||||
} else {
|
||||
$code = \Closure::bind($code, $this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -307,14 +320,14 @@ class Command
|
|||
return;
|
||||
}
|
||||
|
||||
$this->definition->addOptions($this->application->getDefinition()->getOptions());
|
||||
|
||||
if ($mergeArgs) {
|
||||
$currentArguments = $this->definition->getArguments();
|
||||
$this->definition->setArguments($this->application->getDefinition()->getArguments());
|
||||
$this->definition->addArguments($currentArguments);
|
||||
}
|
||||
|
||||
$this->definition->addOptions($this->application->getDefinition()->getOptions());
|
||||
|
||||
$this->applicationDefinitionMerged = true;
|
||||
if ($mergeArgs) {
|
||||
$this->applicationDefinitionMergedWithArgs = true;
|
||||
|
@ -326,7 +339,7 @@ class Command
|
|||
*
|
||||
* @param array|InputDefinition $definition An array of argument and option instances or a definition instance
|
||||
*
|
||||
* @return Command The current instance
|
||||
* @return $this
|
||||
*/
|
||||
public function setDefinition($definition)
|
||||
{
|
||||
|
@ -374,7 +387,7 @@ class Command
|
|||
* @param string $description A description text
|
||||
* @param mixed $default The default value (for InputArgument::OPTIONAL mode only)
|
||||
*
|
||||
* @return Command The current instance
|
||||
* @return $this
|
||||
*/
|
||||
public function addArgument($name, $mode = null, $description = '', $default = null)
|
||||
{
|
||||
|
@ -392,7 +405,7 @@ class Command
|
|||
* @param string $description A description text
|
||||
* @param mixed $default The default value (must be null for InputOption::VALUE_NONE)
|
||||
*
|
||||
* @return Command The current instance
|
||||
* @return $this
|
||||
*/
|
||||
public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null)
|
||||
{
|
||||
|
@ -411,7 +424,7 @@ class Command
|
|||
*
|
||||
* @param string $name The command name
|
||||
*
|
||||
* @return Command The current instance
|
||||
* @return $this
|
||||
*
|
||||
* @throws InvalidArgumentException When the name is invalid
|
||||
*/
|
||||
|
@ -434,7 +447,7 @@ class Command
|
|||
*
|
||||
* @param string $title The process title
|
||||
*
|
||||
* @return Command The current instance
|
||||
* @return $this
|
||||
*/
|
||||
public function setProcessTitle($title)
|
||||
{
|
||||
|
@ -458,7 +471,7 @@ class Command
|
|||
*
|
||||
* @param string $description The description for the command
|
||||
*
|
||||
* @return Command The current instance
|
||||
* @return $this
|
||||
*/
|
||||
public function setDescription($description)
|
||||
{
|
||||
|
@ -482,7 +495,7 @@ class Command
|
|||
*
|
||||
* @param string $help The help for the command
|
||||
*
|
||||
* @return Command The current instance
|
||||
* @return $this
|
||||
*/
|
||||
public function setHelp($help)
|
||||
{
|
||||
|
@ -528,7 +541,7 @@ class Command
|
|||
*
|
||||
* @param string[] $aliases An array of aliases for the command
|
||||
*
|
||||
* @return Command The current instance
|
||||
* @return $this
|
||||
*
|
||||
* @throws InvalidArgumentException When an alias is invalid
|
||||
*/
|
||||
|
@ -579,6 +592,8 @@ class Command
|
|||
* Add a command usage example.
|
||||
*
|
||||
* @param string $usage The usage, it'll be prefixed with the command name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function addUsage($usage)
|
||||
{
|
||||
|
@ -608,10 +623,15 @@ class Command
|
|||
*
|
||||
* @return mixed The helper value
|
||||
*
|
||||
* @throws LogicException if no HelperSet is defined
|
||||
* @throws InvalidArgumentException if the helper is not defined
|
||||
*/
|
||||
public function getHelper($name)
|
||||
{
|
||||
if (null === $this->helperSet) {
|
||||
throw new LogicException(sprintf('Cannot retrieve helper "%s" because there is no HelperSet defined. Did you forget to add your command to the application or to set the application on the command using the setApplication() method? You can also set the HelperSet directly using the setHelperSet() method.', $name));
|
||||
}
|
||||
|
||||
return $this->helperSet->get($name);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue