1
0
Fork 0

replaceVersion() method added

pull/2584/head
Cinderella-Man 2014-01-23 09:58:34 +00:00
parent 99f5b5a238
commit aba201b4ba
1 changed files with 17 additions and 0 deletions

View File

@ -493,4 +493,21 @@ class Package extends BasePackage
{
return $this->archiveExcludes;
}
/**
* Replaces current version and pretty version with passed values.
* It also sets stability.
*
* @param string $version
*
* @param string $prettyVersion
*/
public function replaceVersion($version, $prettyVersion)
{
$this->version = $version;
$this->prettyVersion = $prettyVersion;
$this->stability = VersionParser::parseStability($version);
$this->dev = $this->stability === 'dev';
}
}