update patch 1
This commit is contained in:
+6
-6
@@ -74,7 +74,7 @@ final class CompleteCommand extends Command
|
||||
// "symfony" must be kept for compat with the shell scripts generated by Symfony Console 5.4 - 6.1
|
||||
$version = $input->getOption('symfony') ? '1' : $input->getOption('api-version');
|
||||
if ($version && version_compare($version, self::COMPLETION_API_VERSION, '<')) {
|
||||
$message = sprintf('Completion script version is not supported ("%s" given, ">=%s" required).', $version, self::COMPLETION_API_VERSION);
|
||||
$message = \sprintf('Completion script version is not supported ("%s" given, ">=%s" required).', $version, self::COMPLETION_API_VERSION);
|
||||
$this->log($message);
|
||||
|
||||
$output->writeln($message.' Install the Symfony completion script again by using the "completion" command.');
|
||||
@@ -88,7 +88,7 @@ final class CompleteCommand extends Command
|
||||
}
|
||||
|
||||
if (!$completionOutput = $this->completionOutputs[$shell] ?? false) {
|
||||
throw new \RuntimeException(sprintf('Shell completion is not supported for your shell: "%s" (supported: "%s").', $shell, implode('", "', array_keys($this->completionOutputs))));
|
||||
throw new \RuntimeException(\sprintf('Shell completion is not supported for your shell: "%s" (supported: "%s").', $shell, implode('", "', array_keys($this->completionOutputs))));
|
||||
}
|
||||
|
||||
$completionInput = $this->createCompletionInput($input);
|
||||
@@ -98,13 +98,13 @@ final class CompleteCommand extends Command
|
||||
'',
|
||||
'<comment>'.date('Y-m-d H:i:s').'</>',
|
||||
'<info>Input:</> <comment>("|" indicates the cursor position)</>',
|
||||
' '.(string) $completionInput,
|
||||
' '.$completionInput,
|
||||
'<info>Command:</>',
|
||||
' '.(string) implode(' ', $_SERVER['argv']),
|
||||
' '.implode(' ', $_SERVER['argv']),
|
||||
'<info>Messages:</>',
|
||||
]);
|
||||
|
||||
$command = $this->findCommand($completionInput, $output);
|
||||
$command = $this->findCommand($completionInput);
|
||||
if (null === $command) {
|
||||
$this->log(' No command found, completing using the Application class.');
|
||||
|
||||
@@ -185,7 +185,7 @@ final class CompleteCommand extends Command
|
||||
return $completionInput;
|
||||
}
|
||||
|
||||
private function findCommand(CompletionInput $completionInput, OutputInterface $output): ?Command
|
||||
private function findCommand(CompletionInput $completionInput): ?Command
|
||||
{
|
||||
try {
|
||||
$inputName = $completionInput->getFirstArgument();
|
||||
|
||||
Reference in New Issue
Block a user