private function initConsole(string $name, string $version)
    {
        $this->console = $this->container->get(SymfonyConsoleApplication::class);
        $this->console->setName($name);
        $this->console->setVersion($version);
        $this->console->setCatchExceptions(false);
        $this->console->setAutoExit(false);

        /** @var CommandCollectionContract $commands */
        $commands = $this->container->get(CommandCollectionContract::class);
        foreach ($commands as $command) {
            $this->console->add($this->resolveCommand($command));
        }
    }