Skip to content

Commit 91c8c83

Browse files
committed
Fix comparison with completion api version
1 parent 9ccf365 commit 91c8c83

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Console/Command/CompleteCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8282
try {
8383
// "symfony" must be kept for compat with the shell scripts generated by Symfony Console 5.4 - 6.1
8484
$version = $input->getOption('symfony') ? '1' : $input->getOption('api-version');
85-
if ($version && version_compare($version, self::COMPLETION_API_VERSION, '>=')) {
85+
if ($version && version_compare($version, self::COMPLETION_API_VERSION, '<')) {
8686
$message = sprintf('Completion script version is not supported ("%s" given, ">=%s" required).', $version, self::COMPLETION_API_VERSION);
8787
$this->log($message);
8888

src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function provideCompleteCommandInputDefinitionInputs()
128128
private function execute(array $input)
129129
{
130130
// run in verbose mode to assert exceptions
131-
$this->tester->execute($input ? ($input + ['--shell' => 'bash']) : $input, ['verbosity' => OutputInterface::VERBOSITY_DEBUG]);
131+
$this->tester->execute($input ? ($input + ['--shell' => 'bash', '--api-version' => CompleteCommand::COMPLETION_API_VERSION]) : $input, ['verbosity' => OutputInterface::VERBOSITY_DEBUG]);
132132
}
133133
}
134134

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy