Gogs 1ec4058aa2 Initial configuration | 7 gadi atpakaļ | |
---|---|---|
.. | ||
src | 7 gadi atpakaļ | |
CHANGELOG.md | 7 gadi atpakaļ | |
LICENSE | 7 gadi atpakaļ | |
README.md | 7 gadi atpakaļ | |
composer.json | 7 gadi atpakaļ |
Semver library that offers utilities, version constraint parsing and validation.
Originally written as part of composer/composer, now extracted and made available as a stand-alone library.
Install the latest version with:
$ composer require composer/semver
For details on how versions are compared, refer to the Versions article in the documentation section of the getcomposer.org website.
The Composer\Semver\Comparator
class provides the following methods for comparing versions:
Each function takes two version strings as arguments. For example:
use Composer\Semver\Comparator;
Comparator::greaterThan('1.25.0', '1.24.0'); // 1.25.0 > 1.24.0
The Composer\Semver\Semver
class provides the following methods:
composer/semver is licensed under the MIT License, see the LICENSE file for details.