Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ff70bd1

Browse files
committed
bug #43661 [Console] Show proxified command class in completion debug (GromNaN)
This PR was merged into the 5.4 branch. Discussion ---------- [Console] Show proxified command class in completion debug | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Fix the class shown in completion debug when the command is wrapped in LazyCommand. Before: ``` Input: ("|" indicates the cursor position) bin/console debug:form| Messages: Completing using the Symfony\Component\Console\Command\LazyCommand class. Completing argument_value for class Current value: Suggestions: ``` After: ``` Input: ("|" indicates the cursor position) bin/console debug:form| Messages: Completing using the Symfony\Component\Form\Command\DebugCommand class. Completing argument_value for command Current value: debug:form Suggestions: ``` Commits ------- 90ac3c0 [Console] Add show proxified command class in completion debug
2 parents 3ad8b46 + 90ac3c0 commit ff70bd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
108108
$suggestions->suggestOptions($command->getDefinition()->getOptions());
109109
} else {
110110
$this->log([
111-
' Completing using the <comment>'.\get_class($command).'</> class.',
111+
' Completing using the <comment>'.\get_class($command instanceof LazyCommand ? $command->getCommand() : $command).'</> class.',
112112
' Completing <comment>'.$completionInput->getCompletionType().'</> for <comment>'.$completionInput->getCompletionName().'</>',
113113
]);
114114
if (null !== $compval = $completionInput->getCompletionValue()) {

0 commit comments

Comments
 (0)