projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website]
/
vendor
/
consolidation
/
annotated-command
/
src
/
AnnotatedCommand.php
diff --git
a/vendor/consolidation/annotated-command/src/AnnotatedCommand.php
b/vendor/consolidation/annotated-command/src/AnnotatedCommand.php
index 597d6a2fa97858e05dca42b66fdf77463070e8f5..41be53a96aca8f5f2ed29edaeef29dc2b42b92d6 100644
(file)
--- a/
vendor/consolidation/annotated-command/src/AnnotatedCommand.php
+++ b/
vendor/consolidation/annotated-command/src/AnnotatedCommand.php
@@
-3,8
+3,6
@@
namespace Consolidation\AnnotatedCommand;
use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\Parser\CommandInfo;
use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\Parser\CommandInfo;
-use Consolidation\OutputFormatters\FormatterManager;
-use Consolidation\OutputFormatters\Options\FormatterOptions;
use Consolidation\AnnotatedCommand\Help\HelpDocumentAlter;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Consolidation\AnnotatedCommand\Help\HelpDocumentAlter;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
@@
-132,6
+130,11
@@
class AnnotatedCommand extends Command implements HelpDocumentAlter
}
$this->setCommandArguments($commandInfo);
$this->setReturnType($commandInfo->getReturnType());
}
$this->setCommandArguments($commandInfo);
$this->setReturnType($commandInfo->getReturnType());
+ // Hidden commands available since Symfony 3.2
+ // http://symfony.com/doc/current/console/hide_commands.html
+ if (method_exists($this, 'setHidden')) {
+ $this->setHidden($commandInfo->getHidden());
+ }
return $this;
}
return $this;
}
@@
-225,8
+228,11
@@
class AnnotatedCommand extends Command implements HelpDocumentAlter
*/
protected function checkUsesInputInterface($params)
{
*/
protected function checkUsesInputInterface($params)
{
+ /** @var \ReflectionParameter $firstParam */
$firstParam = reset($params);
$firstParam = reset($params);
- return $firstParam instanceof InputInterface;
+ return $firstParam && $firstParam->getClass() && $firstParam->getClass()->implementsInterface(
+ '\\Symfony\\Component\\Console\\Input\\InputInterface'
+ );
}
/**
}
/**
@@
-251,7
+257,11
@@
class AnnotatedCommand extends Command implements HelpDocumentAlter
$index = $this->checkUsesInputInterface($params) ? 1 : 0;
$this->usesOutputInterface =
(count($params) > $index) &&
$index = $this->checkUsesInputInterface($params) ? 1 : 0;
$this->usesOutputInterface =
(count($params) > $index) &&
- ($params[$index] instanceof OutputInterface);
+ $params[$index]->getClass() &&
+ $params[$index]->getClass()->implementsInterface(
+ '\\Symfony\\Component\\Console\\Output\\OutputInterface'
+ )
+ ;
return $this;
}
return $this;
}
@@
-428,10
+438,15
@@
class AnnotatedCommand extends Command implements HelpDocumentAlter
);
$commandData->setUseIOInterfaces(
);
$commandData->setUseIOInterfaces(
- $this->uses
Out
putInterface,
- $this->uses
In
putInterface
+ $this->uses
In
putInterface,
+ $this->uses
Out
putInterface
);
);
+ // Allow the commandData to cache the list of options with
+ // special default values ('null' and 'true'), as these will
+ // need special handling. @see CommandData::options().
+ $commandData->cacheSpecialDefaults($this->getDefinition());
+
return $commandData;
}
}
return $commandData;
}
}