/** * Updates the running Phar if any is available. * * @param string|Version $version The current version. * @param boolean $major Lock to current major version? * @param boolean $pre Allow pre-releases? * * @return boolean TRUE if an update was performed, FALSE if none available. */ public function update($version, $major = false, $pre = false) { if (false === $version instanceof Version) { $version = Version::create($version); } if (null !== ($update = $this->manifest->findRecent($version, $major, $pre))) { $update->getFile(); $update->copyTo($this->getRunningFile()); return true; } return false; }
public function testFindRecentNone() { $this->assertNull($this->manifest->findRecent(Parser::toVersion('5.0.0'))); }
public function testFindRecentNone() { $this->assertNull($this->manifest->findRecent(Version::create('5.0.0'))); }