src/Application.php
public function runCommand(string $command, array $options, InputInterface $current, OutputInterface $output): int
    {
        # The first input argument must be the command name
        array_unshift($options, $command);
        $input = new ArrayInput($options);

        if (!$current->isInteractive()) {
            $input->setInteractive(false);
        }

        $command = $this->get($command);
        return $this->doRunCommand($command, $input, $output);
    }
public function runCommand(string $command, array $options, InputInterface $current, OutputInterface $output): int
    {
        # The first input argument must be the command name
        array_unshift($options, $command);
        $input = new ArrayInput($options);

        if (!$current->isInteractive()) {
            $input->setInteractive(false);
        }

        $command = $this->get($command);
        return $this->doRunCommand($command, $input, $output);
    }
Run another command, usually from within the currently running command.

@param string $command The fully namespaced name of the command to run
@param array $options An array of options to pass to the command
@param InputInterface $current The input used in the parent command
@param OutputInterface $output The output used in the parent command

@return int 0 if everything went fine, or an error code