protected function execute(InputInterface $input, OutputInterface $output) { $updater = new Updater(null, false, Updater::STRATEGY_GITHUB); $updater->getStrategy()->setPackageName('friendsofphp/pickle'); $updater->getStrategy()->setPharName(self::PHAR_NAME); $updater->getStrategy()->setCurrentLocalVersion($this->getApplication()->getVersion()); if ($input->getOption('unstable')) { $updater->getStrategy()->setStability('unstable'); } if ($updater->update() === false) { $output->writeln('<info>Already up-to-date.</info>'); } else { $output->writeln('<info>' . $updater->getLocalPharFileBasename() . ' has been updated!</info>'); } }
public function testConstructorAncilliaryValues() { $this->assertEquals($this->updater->getLocalPharFileBasename(), 'test'); $this->assertEquals($this->updater->getTempDirectory(), $this->files); }