Execute the version command

@param   InputInterface   $input   An InputInterface instance
@param   OutputInterface  $output  An OutputInterface instance

@return  void
323992
protected function execute(InputInterface $input, OutputInterface $output)
	{
		$this->setupEnvironment('site', $input, $output);

		$version = new \JVersion;

		if ($input->getOption('short'))
		{
			$result = $version->getShortVersion();
		}
		elseif ($input->getOption('release'))
		{
			$result = $version->RELEASE;
		}
		else
		{
			$result = $version->getLongVersion();
		}
		$output->writeln($result);
	}
1131188
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln('Looking for updates...');

        $manager         = $this->createManager($output);
        $version         = $input->getArgument('version')
            ? $input->getArgument('version')
            : $this->getApplication()->getVersion();
        $allowMajor      = $input->getOption('major');
        $allowPreRelease = $input->getOption('pre');

        if (strpos($version, 'v') === 0) {
            // strip v tag from phar version for self-update
            $version = str_replace('v', '', $version);
        }

        $this->updateCurrentVersion($manager, $version, $allowMajor, $allowPreRelease, $output);

        return 0;
    }
1367468
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        $aliasName = $input->getArgument('aliasName');
        $aliasClass = $input->getArgument('aliasClass');
        $this->alias($aliasName, $aliasClass);
    }
1001102
protected function execute(InputInterface $input, OutputInterface $output)
    {
        /* @var $composer Composer */
        $composer = $this->getContainer()->get('anime_db.composer');
        $composer->setIO(new ConsoleIO($input, $output, $this->getHelperSet()));

        /* @var $github GitHub */
        $github = $this->getContainer()->get('anime_db.client.github');

        // search tag with new version of application
        $output->writeln('Search for a new version of the application');
        $tag = $github->getLastRelease('anime-db/anime-db');
        $tag['version'] = Composer::getVersionCompatible($tag['name']);
        $current_version = Composer::getVersionCompatible($composer->getRootPackage()->getPrettyVersion());

        // update itself
        if ($tag && version_compare($tag['version'], $current_version) == 1) {
            $this->doUpdateItself($tag, $composer, $output);
        } else {
            $output->writeln('<info>Application has already been updated to the latest version</info>');
        }
        unset($github, $tag, $current_version);

        // update from composer
        if ($composer->getInstaller()->run() === 0) {
            $output->writeln('<info>Update requirements has been completed</info>');
        } else {
            $output->writeln('<error>During updating dependencies error occurred</error>');
        }
        $output->writeln('<info>Updating the application has been completed<info>');
    }
670443
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln(sprintf('Provider: <comment>%s</comment>', get_class($this->manager->getActiveProvider())));
        $formatter = $this->manager->getFormatter();
        if ($formatter instanceof FormatterInterface) {
            $output->writeln(sprintf('Formatter: <comment>%s</comment>', get_class($formatter)));
        } else {
            $output->writeln(sprintf('Formatter: <comment>%s</comment>', 'None'));
        }

        $version = $this->manager->getVersion();
        $newVersion = $this->manager->getVersionFromProvider();

        if ((string) $version == (string) $newVersion) {
            $output->writeln(sprintf('Current version: <info>%s</info>', $version));
        } else {
            $output->writeln(sprintf('Current version: <error>%s</error>', $version));
            $output->writeln(sprintf('New version: <info>%s</info>', $newVersion));
            $output->writeln(sprintf('<comment>%s</comment>', 'Version outdated, please run the cache:clear command'));
        }
    }
101557
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if ($input->getArgument('version') === null) {
            $version = $this->manager->getVersionFromProvider();
            $output->writeln(sprintf('Provider: <comment>%s</comment>', get_class($this->manager->getActiveProvider())));

            $formatter = $this->manager->getFormatter();
            if ($formatter instanceof FormatterInterface) {
                $output->writeln(sprintf('Formatter: <comment>%s</comment>', get_class($formatter)));
            } else {
                $output->writeln(sprintf('Formatter: <comment>%s</comment>', 'None'));
            }
        } else {
            $version = Version::fromString($input->getArgument('version'));
            $output->writeln(sprintf('Provider: <comment>%s</comment>', 'Symfony command'));
            $output->writeln(sprintf('Formatter: <comment>%s</comment>', 'Not available'));
        }

        $incrementMajor = (int) $input->getOption('major');
        if ($incrementMajor > 0) {
            for ($i = 0; $i < $incrementMajor; $i++) {
                $version = $version->withMajorIncremented();
            }
        }

        $incrementMinor = (int) $input->getOption('minor');
        if ($incrementMinor > 0) {
            for ($i = 0; $i < $incrementMinor; $i++) {
                $version = $version->withMinorIncremented();
            }
        }

        $incrementPatch = (int) $input->getOption('patch');
        if ($incrementPatch > 0) {
            for ($i = 0; $i < $incrementPatch; $i++) {
                $version = $version->withPatchIncremented();
            }
        }

        $preRelease = $input->getOption('prerelease');
        if (!empty($preRelease)) {
            if (in_array(null, $preRelease)) {
                $preRelease = array();
            }

            $version = $version->withPreRelease($preRelease);
        }

        $build = $input->getOption('build');
        if (!empty($build)) {
            if (in_array(null, $build)) {
                $build = array();
            }

            $version = $version->withBuild($build);
        }

        $currentVersion = $this->manager->getVersion();
        if ((string) $currentVersion == (string) $version) {
            $version = $version->withPatchIncremented();
        }

        $output->writeln(sprintf('Current version: <info>%s</info>', $currentVersion));
        $output->writeln(sprintf('New version: <info>%s</info>', $version));
        if ($input->getOption('dry-run')) {
            $output->writeln(sprintf('<question>%s</question>', 'Dry run, skipping version bump'));
        } else {
            $this->manager->writeVersion($version);
        }
    }
619070
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $targetArg = rtrim($input->getArgument('target'), '/');

        if (!is_dir($targetArg)) {
            throw new \InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $input->getArgument('target')));
        }

        $wantedVersion = $input->getOption('jquery-version');

        $vParser = new VersionParser();

        try {
            $jQueryVersionConstraint = $vParser->parseConstraints($wantedVersion);
        } catch (UnexpectedValueException $e) {
            $output->writeln(
                '<error>Error:</error> <info>' .
                $wantedVersion . '</info> is not a valid version constraint.'
            );
            return;
        }

        $minimalVersionConstraint =
            $vParser->parseConstraints('>=' . $this->minimalSupportedVersion);

        if(!$minimalVersionConstraint->matches($jQueryVersionConstraint)) {
            $output->writeln(
                '<error>Error:</error> <info>' .
                $wantedVersion . '</info> is not supported. Minimal version is: ' .
                $this->minimalSupportedVersion
            );
            return;
        }

        $curl = new Curl();
        $curl->get(
            'https://api.github.com' .
            '/repos/jquery/jquery/tags?per_page=100'
        );

        $versionToInstall = $this->minimalSupportedVersion;

        foreach(json_decode($curl->response) as $release) {
            $tag = $release->name;
            if($vParser->parseStability($tag) == 'stable') {
                try {
                    $constraint = $vParser->parseConstraints($tag);
                    if($jQueryVersionConstraint->matches($constraint)) {
                        if(version_compare(
                                $vParser->normalize($tag),
                                $versionToInstall)
                            > 0) {
                            $versionToInstall = $tag;
                        }
                    } else {
                    }
                } catch (UnexpectedValueException $e) {
                }
            }
        }

        /** @var Filesystem $filesystem */
        $filesystem = $this->getContainer()->get('filesystem');

        // Create the bundles directory otherwise symlink will fail.
        $bundlesDir = $targetArg . '/bundles/';
        $filesystem->mkdir($bundlesDir, 0777);

        $output->writeln(
            'Installing JQuery assets.'
        );

        $targetDir  = $bundlesDir . 'jquery-extra';

        $namespaceParts = explode('\\', __NAMESPACE__);
        array_pop($namespaceParts);

        $output->writeln(
            sprintf(
                'Installing assets for <comment>%s</comment> into <comment>%s</comment>',
                implode('\\', $namespaceParts),
                $targetDir
            )
        );

        $filesystem->remove($targetDir);

        $filesystem->mkdir($targetDir, 0777);

        $filesystem->mkdir($targetDir . '/tmp');

        $zip = file_get_contents(
            'https://github.com/jquery/jquery/archive/' . $versionToInstall . '.zip'
        );

        file_put_contents($targetDir . '/tmp/jquery.zip', $zip);

        $zip = new \ZipArchive;

        if ($zip->open($targetDir . '/tmp/jquery.zip') === TRUE) {
            $zip->extractTo($targetDir . '/tmp');
            $zip->close();

            if(file_exists($targetDir . '/tmp/jquery-' . $versionToInstall . '/dist')) {
                $filesystem->mirror(
                    $targetDir . '/tmp/jquery-' . $versionToInstall . '/dist',
                    $targetDir
                );
            } else {
                foreach( array(
                    'jquery.js',
                    'jquery.min.js',
                    'jquery.min.map',
                    'jquery-migrate.js',
                    'jquery-migrate.min.js',
                ) as $file) {
                    if(
                        file_exists(
                            $targetDir .
                            '/tmp/jquery-' .
                            $versionToInstall .
                            '/' . $file)) {
                        $filesystem->copy(
                            $targetDir . '/tmp/jquery-' . $versionToInstall . '/' . $file,
                            $targetDir . '/' . $file
                        );
                    }
                }
            }
            $filesystem->remove($targetDir . '/tmp');
        } else {
            throw new FileException('File Error');
        }
    }
69036
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $root = $this->getContainer()->getParameter('kernel.root_dir');
        chdir("$root/..");
        $path = "$root/Resources/gettext/messages.pot";
        $languages = $input->getArgument('languages');
        $results = $this->initializeFromTemplate($path, $languages);
        foreach ($results as $filename => $status) {
            $output->writeln("$status: $filename");
        }
    }
554408
public function execute(InputInterface $input, OutputInterface $output)
    {
        $source = $this->loadFiles($input->getArgument('source'));

        $this->rivescript->load($source);

        $loadedSource = explode('/', $input->getArgument('source'));
        $loadedSource = end($loadedSource);

        $output->writeln('RiveScript Interpreter (PHP) -- Interactive Console v2.0');
        $output->writeln('--------------------------------------------------------');
        $output->writeln('RiveScript Version:       2.0');
        $output->writeln('Currently Loaded Source:  '.$loadedSource);
        $output->writeln('');
        $output->writeln('You are now chatting with a RiveScript bot. Type a message and press Return');
        $output->writeln('to send it. When finished, type "/quit" to exit the interactive console.');
        $output->writeln('');

        $this->waitForUserInput($input, $output);
    }
828092
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->addOption('--environment', '-e', InputArgument::OPTIONAL);
        $input->setOption('environment', getenv('RAD_ENVIRONMENT'));
        parent::execute($input, $output);
    }
53704
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->before($input, $output);
        $this->runTransient($input, $output);
        $this->after($input, $output);
    }
1139589
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->getBaseFiles();

        foreach ($this->languages as $lang) {
            $this->processLanguage($output, $lang);
        }
    }
413362
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $actions = new Finder(APP_PATH, 'One\\Context\\Contracts\\Action', 'php');

        foreach ($actions as $action) {
            $this->output('Action', 'info', $action->getBasename('.php'), '');
        }
    }
1133146
public function run(InputInterface $input, OutputInterface $output)
    {
        return parent::run(
            $this->input = $input, $this->output = new OutputStyle($input, $output)
        );
    }
514558
public function doRun(InputInterface $input, OutputInterface $output)
    {
        if (!$input->hasParameterOption('--quiet')) {
            $output->write(
                sprintf(
                    "phpjunitmerge %s by Andreas Weber\n\n",
                    $this->getVersion()
                )
            );
        }

        if ($input->hasParameterOption('--version')
            || $input->hasParameterOption('-V')
        ) {
            exit;
        }

        if (!$input->getFirstArgument()) {
            $input = new ArrayInput(array('--help'));
        }

        parent::doRun($input, $output);
    }
623294
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        $outputFile = null;
        if ($file = $input->getOption('output-file')) {
            $outputFile = $file;
        }
        $this->service($input->getArgument($this->argument), $outputFile);
    }
844308
public function doRun(InputInterface $input, OutputInterface $output)
    {
        // always show the version information except when the user invokes the help
        // command as that already does it
        if (($input->hasParameterOption(['--help', '-h']) !== false) || ($input->getFirstArgument() !== null && $input->getFirstArgument() !== 'list')) {
            $output->writeln($this->getLongVersion());
            $output->writeln('');
        }

        return parent::doRun($input, $output);
    }