z4kn4fein/php-semver
Semantic Versioning library for PHP. It implements the full semantic version 2.0.0 specification and provides ability to parse, compare, and increment semantic versions along with validation against constraints.
v3.0.0
1.9M downloads/mo
#2643 most downloaded on Packagist
z4kn4fein/php-semver
What this package is like to depend on
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 8 days to 2.0 years
Most releases are documented
notes for 7 of 8 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
8 releases · first in 2019
0 releases in the last 12 months
see the full history below
Release timeline
8 releases · Dec 2019 to Apr 2024Releases
latest 8-
v3.0.001 Apr 2024 -
v2.0.223 Mar 2023Release notes
Open source →Fixed
- #6: Calling
copyon a stable version attached an empty pre-release identity to the new version.
- #6: Calling
-
v2.0.115 Sep 2022Release notes
Open source →Added
- Support for
|as constraintORoperator. Now constraints like^2|^3are recognised correctly. - Dedicated sorting methods.
- Support for
-
v2.0.013 Sep 2022Release notes
Open source →Added
- Constraint validation support.
- Loose version parsing support.
->isPreRelease()method to determine whether the actual version is pre-release or not.->isStable()method to determine whether the actual version is stable or not.->withoutSuffixes()method to get the version without suffixes.Version::compare()andVersion::compareString()methods to use withusort().->isNotEqual(Version)andVersion::notEqual(string)comparison methods.Version::parseOrNull()andConstraint::parseOrNull()methods for cases when exception-less execution is more desirable.- API documentation.
Breaking changes
- Instance level comparison methods are now only accept
Versionparameters. String based version comparison is still available with static comparison methods. VersionFormatExceptionwas renamed toSemverException.
-
v1.2.021 Mar 2022 -
v1.1.009 Jan 2022 -
v1.0.103 Jan 2020 -
v1.0.025 Dec 2019Nothing published for this version