/** * @param Builder $builder * @param $matches */ protected function handleMetaData(Builder $builder, $matches) { if (intval($matches[7]) != 0) { // we are not on TAG commit, add "dev" and git commit hash as pre release part $preRelease = array_merge($builder->getPreRelease(), array('dev', $matches[8])); $builder->setPreRelease($preRelease); } }
public function testSetPreReleaseInvalid() { $this->setExpectedException('Herrera\\Version\\Exception\\InvalidIdentifierException', 'The identifier "+" is invalid.'); $this->builder->setPreRelease(array('+')); }