herrera-io/version

A library for creating, editing, and comparing semantic versioning numbers.

Installs: 58 659

Dependents: 9

Stars: 83

Watchers: 8

Forks: 14

Open Issues: 2

Language: PHP

1.1.1 2014-05-27 05:29 UTC

README

Build Status

Version is a library for creating, editing, and comparing semantic version numbers. Currently, v2.0.0 of the Semantic Versioning specification is supported.

use Herrera\Version\Dumper;
use Herrera\Version\Parser;

$builder = Parser::toBuilder('1.2.3-alpha+2');
$builder->incrementMajor();
$builder->clearBuild();
$builder->clearPreRelease();

echo Dumper::toString($builder); // echoes "2.0.0"

$finalVersion = $builder->getVersion();

Documentation