phar-io/version
phar-io/version is a PHP library for parsing, comparing, and validating semantic versions and version constraints. Supports operators like >=, <=, caret (^) and tilde (~) ranges, plus pre-release labels, to check if versions comply.
Version::getOriginalString() added (Thanks @addshore)^) now honor pre-1.0 releases, e.g. ^0.3 translates to 0.3.*)This release now supports PHP 7.2+ and PHP ^8.0. No other changes included.
3.0.0 > 3.0.0-alpha.1Changes to public API:
PreReleaseSuffix::construct(): optional parameter $number removedPreReleaseSuffix::isGreaterThan(): introducedVersion::hasPreReleaseSuffix(): introduced#11: Added support for pre-release version suffixes. Supported values are:
devbeta (also abbreviated form b)rcalpha (also abbreviated form a)patch (also abbreviated form p)All values can be followed by a number, e.g. beta3.
When comparing versions, the pre-release suffix is taken into account. Example:
1.5.0 > 1.5.0-beta1 > 1.5.0-alpha3 > 1.5.0-alpha2 > 1.5.0-dev11
Version::equals() addedPotential BC Break Notice:
Version::getVersionString() no longer returns v prefixes in case the "input"
string contained one. These are not part of the semver specs
(see https://semver.org/#is-v123-a-semantic-version) and get stripped out.
As of Version 3.1.0 Version::getOriginalString() can be used to still
retrieve it as given.
How can I help you explore Laravel packages today?