Skip to content
This repository has been archived by the owner. It is now read-only.
A semantic version parser and comparison library. [DEPRECATED]
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test/suite
.gitattributes
.gitignore
.php_cs
CHANGELOG.md
LICENSE
README.md
composer.json
composer.lock

README.md

SemVer

This project has been deprecated by the authors. Use composer/semver instead.

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);
You can’t perform that action at this time.