findCommand example

$this->log([
                '',
                '<comment>'.date('Y-m-d H:i:s').'</>',
                '<info>Input:</> <comment>("|" indicates the cursor position)</>',
                ' '.(string) $completionInput,
                '<info>Command:</>',
                ' '.(string) implode(' ', $_SERVER['argv']),
                '<info>Messages:</>',
            ]);

            $command = $this->findCommand($completionInput$output);
            if (null === $command) {
                $this->log(' No command found, completing using the Application class.');

                $this->getApplication()->complete($completionInput$suggestions);
            } elseif (
                $completionInput->mustSuggestArgumentValuesFor('command')
                && $command->getName() !== $completionInput->getCompletionValue()
                && !\in_array($completionInput->getCompletionValue()$command->getAliases(), true)
            ) {
                $this->log(' No command found, completing using the Application class.');

                
$this->log([
                '',
                '<comment>'.date('Y-m-d H:i:s').'</>',
                '<info>Input:</> <comment>("|" indicates the cursor position)</>',
                ' '.(string) $completionInput,
                '<info>Command:</>',
                ' '.(string) implode(' ', $_SERVER['argv']),
                '<info>Messages:</>',
            ]);

            $command = $this->findCommand($completionInput$output);
            if (null === $command) {
                $this->log(' No command found, completing using the Application class.');

                $this->getApplication()->complete($completionInput$suggestions);
            } elseif (
                $completionInput->mustSuggestArgumentValuesFor('command')
                && $command->getName() !== $completionInput->getCompletionValue()
                && !\in_array($completionInput->getCompletionValue()$command->getAliases(), true)
            ) {
                $this->log(' No command found, completing using the Application class.');

                
Home | Imprint | This part of the site doesn't use cookies.