You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -530,7 +530,7 @@ public function add(Command $command): ?Command
530
530
}
531
531
532
532
if (!$command->getName()) {
533
-
thrownewLogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_debug_type($command)));
533
+
thrownewLogicException(\sprintf('The command defined in "%s" cannot have an empty name.', get_debug_type($command)));
534
534
}
535
535
536
536
$this->commands[$command->getName()] = $command;
@@ -552,12 +552,12 @@ public function get(string $name): Command
552
552
$this->init();
553
553
554
554
if (!$this->has($name)) {
555
-
thrownewCommandNotFoundException(sprintf('The command "%s" does not exist.', $name));
555
+
thrownewCommandNotFoundException(\sprintf('The command "%s" does not exist.', $name));
556
556
}
557
557
558
558
// When the command has a different name than the one used at the command loader level
559
559
if (!isset($this->commands[$name])) {
560
-
thrownewCommandNotFoundException(sprintf('The "%s" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".', $name));
560
+
thrownewCommandNotFoundException(\sprintf('The "%s" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".', $name));
561
561
}
562
562
563
563
$command = $this->commands[$name];
@@ -621,7 +621,7 @@ public function findNamespace(string $namespace): string
thrownewNamespaceNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces));
641
+
thrownewNamespaceNotFoundException(\sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces));
642
642
}
643
643
644
644
return$exact ? $namespace : reset($namespaces);
@@ -685,7 +685,7 @@ public function find(string $name): Command
685
685
$this->findNamespace(substr($name, 0, $pos));
686
686
}
687
687
688
-
$message = sprintf('Command "%s" is not defined.', $name);
688
+
$message = \sprintf('Command "%s" is not defined.', $name);
689
689
690
690
if ($alternatives = $this->findAlternatives($name, $allCommands)) {
691
691
// remove hidden commands
@@ -740,14 +740,14 @@ public function find(string $name): Command
thrownewCommandNotFoundException(sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $name, $suggestions), array_values($commands));
743
+
thrownewCommandNotFoundException(\sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $name, $suggestions), array_values($commands));
744
744
}
745
745
}
746
746
747
747
$command = $this->get(reset($commands));
748
748
749
749
if ($command->isHidden()) {
750
-
thrownewCommandNotFoundException(sprintf('The command "%s" does not exist.', $name));
750
+
thrownewCommandNotFoundException(\sprintf('The command "%s" does not exist.', $name));
751
751
}
752
752
753
753
return$command;
@@ -822,7 +822,7 @@ public function renderThrowable(\Throwable $e, OutputInterface $output): void
return$this->definition ?? thrownewLogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', static::class));
398
+
return$this->definition ?? thrownewLogicException(\sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', static::class));
399
399
}
400
400
401
401
/**
@@ -603,7 +603,7 @@ public function getSynopsis(bool $short = false): string
thrownewLogicException(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));
645
+
thrownewLogicException(\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));
646
646
}
647
647
648
648
return$this->helperSet->get($name);
@@ -658,7 +658,7 @@ public function getHelper(string $name): HelperInterface
658
658
privatefunctionvalidateName(string$name): void
659
659
{
660
660
if (!preg_match('/^[^\:]++(\:[^\:]++)*$/', $name)) {
661
-
thrownewInvalidArgumentException(sprintf('Command name "%s" is invalid.', $name));
661
+
thrownewInvalidArgumentException(\sprintf('Command name "%s" is invalid.', $name));
if ($version && version_compare($version, self::COMPLETION_API_VERSION, '<')) {
77
-
$message = sprintf('Completion script version is not supported ("%s" given, ">=%s" required).', $version, self::COMPLETION_API_VERSION);
77
+
$message = \sprintf('Completion script version is not supported ("%s" given, ">=%s" required).', $version, self::COMPLETION_API_VERSION);
78
78
$this->log($message);
79
79
80
80
$output->writeln($message.' Install the Symfony completion script again by using the "completion" command.');
@@ -88,7 +88,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
88
88
}
89
89
90
90
if (!$completionOutput = $this->completionOutputs[$shell] ?? false) {
91
-
thrownew \RuntimeException(sprintf('Shell completion is not supported for your shell: "%s" (supported: "%s").', $shell, implode('", "', array_keys($this->completionOutputs))));
91
+
thrownew \RuntimeException(\sprintf('Shell completion is not supported for your shell: "%s" (supported: "%s").', $shell, implode('", "', array_keys($this->completionOutputs))));
Copy file name to clipboardExpand all lines: Command/DumpCompletionCommand.php
+2-2
Original file line number
Diff line number
Diff line change
@@ -98,9 +98,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
98
98
$output = $output->getErrorOutput();
99
99
}
100
100
if ($shell) {
101
-
$output->writeln(sprintf('<error>Detected shell "%s", which is not supported by Symfony shell completion (supported shells: "%s").</>', $shell, implode('", "', $supportedShells)));
101
+
$output->writeln(\sprintf('<error>Detected shell "%s", which is not supported by Symfony shell completion (supported shells: "%s").</>', $shell, implode('", "', $supportedShells)));
102
102
} else {
103
-
$output->writeln(sprintf('<error>Shell not detected, Symfony shell completion only supports "%s").</>', implode('", "', $supportedShells)));
103
+
$output->writeln(\sprintf('<error>Shell not detected, Symfony shell completion only supports "%s").</>', implode('", "', $supportedShells)));
0 commit comments