icecave / semver
A semantic version parser and comparison library.
Installs: 150 841
Dependents: 2
Suggesters: 0
Security: 0
Stars: 15
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=5.3
- icecave/parity: ~1
Requires (Dev)
- icecave/archer: ~1
README
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.
- Install via Composer package icecave/semver
- Read the API documentation
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);