private function symfonyDoRun(InputInterface $input, OutputInterface $output, $default = 'list-commands')
    {
        if (true === $input->hasParameterOption(['--version', '-V'])) {
            $output->writeln($this->getLongVersion());

            return 0;
        }

        $name = $this->getCommandName($input);

        if (true === $input->hasParameterOption(['--help', '-h'])) {
            if (!$name) {
                $name = 'help';
                $input = new ArrayInput(['command' => 'help']);
            } else {
                // TODO $wantHelps is private in parent class
                $this->wantHelps = true;
            }
        }

        if (!$name) {
            $name = $default;
            $input = new ArrayInput(['command' => $default]);
        }

        // the command name MUST be the first element of the input
        $command = $this->find($name);

        $this->runningCommand = $command;
        $exitCode = $this->doRunCommand($command, $input, $output);
        $this->runningCommand = null;

        return $exitCode;
    }