@param InputInterface  $input
@param OutputInterface $output

@throws InstallFailedException when version file is invalid
10924
protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $config = $this->config;
        $tempDir = $config->get('dotfiles.temp_dir');

        $output->writeln('Start checking new version');
        $url = static::BASE_URL.'/dotfiles.phar.json';
        $versionFile = $tempDir.'/update/dotfiles.phar.json';
        Toolkit::ensureFileDir($versionFile);
        $downloader = $this->downloader;
        $downloader->run($url, $versionFile);
        $contents = file_get_contents($versionFile);
        if ('' === trim($contents)) {
            throw new InstallFailedException('Can not parse dotfiles.phar.json file');
        }
        $json = json_decode($contents, true);

        $this->versionFile = $versionFile;
        $this->version = $json['version'];
        $this->branchAlias = $json['branch'];
        $this->date = $json['date'];

        if (Application::VERSION !== $this->version) {
            $output->writeln("Begin update into <comment>{$this->version}</comment>");
            $this->doUpdate($output);
            $this->getApplication()->get('clear-cache')->run($input, $output);
        } else {
            $output->writeln('You already have latest <comment>dotfiles</comment> version');
        }
    }
521780
protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $configFilesOption = $input->getOption('config');
        $outputOption = $input->getOption('output');
        $formatOption = $input->getOption('format');

        '@phan-var string $configFilesOption';
        '@phan-var string $outputOption';
        '@phan-var string $formatOption';

        $configFiles       = $this->getPossibleConfigFiles($configFilesOption);
        $configuration     = $this->linterConfigurationLocator->loadConfiguration($configFiles);
        $paths             = $input->getArgument('paths') ?: $configuration->getPaths();
        $outputTarget      = $input->getOption('output');
        $exitWithExitCode  = $input->getOption('exit-code') || $input->getOption('fail-on-warnings');

        '@phan-var string[] $paths';

        if (false == $outputTarget) {
            throw new BadOutputFileException('Bad output file.');
        }

        if ($outputOption === '-') {
            $reportOutput = $output;
        } else {
            $fileHandle = fopen($outputOption, 'w');
            if ($fileHandle === false) {
                throw new \Exception("could not open file '${outputOption}' for writing");
            }

            $reportOutput = new StreamOutput($fileHandle);
        }

        $logger = $this->loggerBuilder->createLogger($formatOption, $reportOutput, $output);

        $report   = new Report();
        $patterns = $configuration->getFilePatterns();

        $files = $this->finder->getFilenames($paths, $patterns, new CallbackFinderObserver(function ($name) use ($logger) {
            $logger->notifyFileNotFound($name);
        }));
        $logger->notifyFiles($files);

        foreach ($files as $filename) {
            $logger->notifyFileStart($filename);
            $fileReport = $this->linter->lintFile($filename, $report, $configuration, $logger);
            $logger->notifyFileComplete($filename, $fileReport);
        }

        $logger->notifyRunComplete($report);

        $exitCode = 0;
        if ($report->countIssuesBySeverity(Issue::SEVERITY_ERROR) > 0) {
            $exitCode = 2;
        } else if ($exitWithExitCode && $report->countIssues() > 0) {
            $exitCode = 2;
        }

        $this->eventDispatcher->addListener(
            ConsoleEvents::TERMINATE,
            function (ConsoleTerminateEvent $event) use ($exitCode) {
                $event->setExitCode($exitCode);
            }
        );
    }
461435
public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->hostFile->rollback();

        $output->writeLn('Rolled backed to latest backup.');
    }
265022
protected function execute(InputInterface $input, OutputInterface $output)
    {
        foreach ($this->familyRegistry->getFamilies() as $family) {
            $this->updateFamilyData($family, $output);
        }
    }
862069
protected function execute(InputInterface $input, OutputInterface $output)
	{
		$this->setupEnvironment('administrator', $input, $output);

		// Enable debug, so that JInstaller::install() throws exceptions on problems
		$this->joomla->setCfg('debug', 1);

		$installer = \JInstaller::getInstance();

		if ($installer->install($this->handleExtension($input, $output)))
		{
			$output->writeln($this->getExtensionInfo($installer));

			return 0;
		}
		else
		{
			$output->writeln('Installation failed due to unknown reason.');

			return 1;
		}
	}
930664
protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $filename = $input->getArgument('filename');

        '@phan-var string $filename';

        $output->writeln("Parsing input file <comment>{$filename}</comment>.");

        $tokens = $this->tokenizer->tokenizeStream($filename);

        $output->write($this->tokenPrinter->printTokenStream($tokens));
    }
245482
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $path = $input->getArgument('path');
        $version = $input->getArgument('version');
        $package_name = $input->getArgument('name');
        if (!file_exists($path) && !is_file($input->getArgument('path'))) {
            self::error($output, "The specified path is missing or a directory");
        } else {
            if (json_decode(file_get_contents($path)) == null) {
                self::error($output, "The specified file is not a valid JSON file");
            } else {
                $packager = new Magazine($path, $version, $output, $package_name);
                $packager->package();
            }
        }
    }
489985
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $finder     = new Finder();
        $filesystem = new Filesystem();
        $filesystem->remove($finder->directories()->in($this->getLanguageBasePath()));
    }
99977
public function execute(InputInterface $input, OutputInterface $output)
    {
        $excluded = [];

        if ($input->getOption('exclude')) {
            $excluded = explode(',', $input->getOption('exclude'));
        }

        $io = new OutputStyle($input, $output);

        $composerPath = $this->getComposerPathFromInput($input);

        $ladder = new Ladder($composerPath);

        $packages = $ladder->getOutdatedPackages($excluded);

        $io->newLine();

        $statusCode = 0;

        if (!count($packages)) {
            $io->writeln('All dependencies match the latest package versions <fg=green>:)</>');
            $io->newLine();

            return $statusCode;
        }

        $outdated = [];
        $upgradable = [];

        foreach ($packages as $package) {
            $diff = $io->versionDiff($package->getVersion(), $package->getLatestVersion());

            if ($package->isUpgradable()) {
                $upgradable[] = [$package->getName(), $package->getVersion(), '→', $diff];
            } else {
                $outdated[] = [$package->getName(), $package->getVersion(), '→', $diff];
            }
        }

        if (count($outdated) && !$input->getOption('upgradable')) {
            $statusCode = 1;

            $io->columns($outdated);
            $io->newLine();
        }

        if (count($upgradable) && !$input->getOption('outdated')) {
            $statusCode = 1;

            $io->writeln('The following dependencies are satisfied by their declared version constraint, but the installed versions are behind. You can install the latest versions without modifying your composer.json file by using <fg=blue>composer update</>.');
            $io->newLine();
            $io->columns($upgradable);
            $io->newLine();
        }

        return $statusCode;
    }
1046115
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->triggerInitialBuild($input, $output);
        $this->startGulpWatcher($input, $output);
    }
1365760
protected function execute(InputInterface $input, OutputInterface $output)
    {
        foreach ($this->getFacade()->migrate() as $line) {
            $output->write($line);
        }
    }
461214
public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = new SymfonyStyle($input, $output);

        $this->path = getcwd().'/'.$input->getArgument('name');

        $installers = [
            Installation\CreateLaravelProject::class,
            Installation\DownloadSpark::class,
            Installation\UpdateComposerFile::class,
            Installation\ComposerUpdate::class,
            Installation\AddCoreProviderToConfiguration::class,
            Installation\RunSparkInstall::class,
            Installation\AddAppProviderToConfiguration::class,
            Installation\RunNpmInstall::class,
            Installation\CompileAssets::class,
        ];

        foreach ($installers as $installer) {
            (new $installer($this, $input->getArgument('name')))->install();
        }
    }
216255
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->bootstrap($input, $output);

        $environment = $input->getOption('environment');
        $version = $input->getOption('target');
        $removeAll = $input->getOption('remove-all');

        if ($environment === null) {
            $environment = $this->getConfig()->getDefaultEnvironment();
            $output->writeln('<comment>warning</comment> no environment specified, defaulting to: ' . $environment);
        } else {
            $output->writeln('<info>using environment</info> ' . $environment);
        }

        if ($version && $removeAll) {
            throw new \InvalidArgumentException('Cannot toggle a breakpoint and remove all breakpoints at the same time.');
        }

        // Remove all breakpoints
        if ($removeAll) {
            $this->getManager()->removeBreakpoints($environment);
        } else {
            // Toggle the breakpoint.
            $this->getManager()->toggleBreakpoint($environment, $version);
        }
    }
203724
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if (!$this->verifyInstalled($output)) {
            return;
        }

        $output->write(Lang::get('updating_phpci'));

        shell_exec(PHPCI_DIR . 'vendor/bin/phinx migrate -c "' . PHPCI_DIR . 'phinx.php"');

        $output->writeln('<info>'.Lang::get('ok').'</info>');
    }
1250823
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $updater = new Updater(null, false, Updater::STRATEGY_GITHUB);
        /** @var GithubStrategy $strategy */
        $strategy = $updater->getStrategy();
        $strategy->setPackageName('TYPO3/Surf');
        $strategy->setPharName('surf.phar');

        $io = new SymfonyStyle($input, $output);

        $stability = $input->getOption('stability');
        if (empty($stability)) {
            $stability = GithubStrategy::STABLE;
        }
        /** @var GithubStrategy $strategy */
        $strategy = $updater->getStrategy();
        $strategy->setCurrentLocalVersion($this->getApplication()->getVersion());
        $strategy->setStability($stability);

        if ($input->getOption('check')) {
            $result = $updater->hasUpdate();
            if ($result) {
                $output->writeln(sprintf(
                    'The %s build available remotely is: %s',
                    $strategy->getStability() === GithubStrategy::ANY ? 'latest' : 'current ' . $strategy->getStability(),
                    $updater->getNewVersion()
                ));
            } elseif (false === $updater->getNewVersion()) {
                $output->writeln('There are no new builds available.');
            } else {
                $output->writeln(sprintf('You have the current %s build installed.', $strategy->getStability()));
            }
        } elseif ($input->getOption('rollback')) {
            $result = $updater->rollback();
            $result ? $output->writeln('Success!') : $output->writeln('Failure!');
        } else {
            $result = $updater->update();

            if ($result) {
                $io->success(
                    sprintf(
                        'Your %s has been updated from "%s" to "%s".',
                        $this->getLocalPharName(),
                        $updater->getOldVersion(),
                        $updater->getNewVersion()
                    )
                );
            } else {
                $io->success(sprintf('Your %s is already up to date.', $this->getLocalPharName()));
            }
        }
    }
614594
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $filename = $input->getArgument('filename');
        $yaml_parsed = $this->loadYamlFile($filename);
        if (!$yaml_parsed) {
            // Exit with a status of 1.
            return 1;
        }

        if (OutputInterface::VERBOSITY_VERBOSE === $output->getVerbosity()) {
            $output->writeln("<info>The file $filename contains valid YAML.</info>");
        }
    }
751394
protected function rebuild(InputInterface $input, OutputInterface $output)
    {
        $puli = new Puli(Path::join([getcwd(), NANBANDO_DIR]));
        $puli->start();

        /** @var EmbeddedComposerInterface $embeddedComposer */
        $embeddedComposer = $this->getApplication()->getEmbeddedComposer();

        $packageManager = $puli->getPackageManager();
        $io = new ConsoleIO($input, $output, $this->getApplication()->getHelperSet());
        $composer = $embeddedComposer->createComposer($io);
        $installationManager = $composer->getInstallationManager();
        $rootPackage = $composer->getPackage();

        $repository = $composer->getRepositoryManager()->getLocalRepository();
        $packages = [];
        foreach ($repository->getPackages() as $package) {
            $packages[$package->getName()] = $package;
        }

        foreach ($rootPackage->getRequires() as $require) {
            if (!array_key_exists($require->getTarget(), $packages)) {
                continue;
            }

            $packageManager->installPackage(
                Path::normalize($installationManager->getInstallPath($packages[$require->getTarget()])),
                $require->getTarget(),
                'nanbando'
            );
        }

        $filesystem = new Filesystem();
        $filesystem->remove(Path::join([getcwd(), NANBANDO_DIR, '.puli']));

        $discoveryManager = $puli->getDiscoveryManager();
        if (!$discoveryManager->hasRootTypeDescriptor('nanbando/bundle')) {
            $discoveryManager->addRootTypeDescriptor(new BindingTypeDescriptor(new BindingType('nanbando/bundle')), 0);
        }

        $discoveryManager->clearDiscovery();
        $discoveryManager->buildDiscovery();

        $filesystem = new Filesystem();
        $filesystem->remove(Path::join([getcwd(), NANBANDO_DIR, 'app', 'cache']));
    }