icecave/semver

A semantic version parser and comparison library.

Installs: 1 507

Dependents: 1

Stars: 16

Watchers: 2

Forks: 1

Language: PHP

3.0.3 2015-03-09 04:51 UTC

README

Build Status Test Coverage SemVer

SemVer is a PHP library for parsing and comparing version numbers according to the Semantic Versioning standard. The current version behaves according to version 2.0.0 of the specification.

Example

use Icecave\SemVer\Version;
use Icecave\SemVer\Comparator;

// Create versions from strings ...
$version1 = Version::parse('1.2.0-rc.1+build.meta.data');
$version2 = Version::parse('1.3.0');

// Compare the versions ...
$comparator = new Comparator;
assert($comparator->compare($version1, $version2) < 0);

Contact us