class to compare version numbers. it supports the following keywords: "pre", "-dev", "b", "beta", "a", "alpha".
It supports also the "*" wilcard. This wilcard must be the last part of the version number.
| package |
Default |
|---|
compare(\Jelix\Version\Version $version1, \Jelix\Version\Version $version2) : integer
\Jelix\Version\Version
\Jelix\Version\Version
integercompareVersion(string $version1, string $version2) : integer
It supports wildcard in one of the version
string
string
integer0 if equal, -1 if $version1 < $version2, 1 if $version1 > $version2
compareVersionRange(string $version, string $range) : boolean
stringa version number
stringa version expression respecting Composer range syntax
booleantrue if the given version match the given range
compileRange( $range) : \Jelix\Version\VersionRangeOperatorInterface
normalizeVersionNumber( &$n)
serializeVersion( $version, integer $starReplacement, $pad = 4)
It doesn't support all version notation. Use serializeVersion2 instead.
| deprecated | |
|---|---|
integer1 if it should replace by max value, 0 for min value
serializeVersion2( $version, integer $starReplacement, $maxpad = 10)
integer1 if it should replace '*' by max value, 0 for min value