phlak/semver
A lightweight PHP library for parsing, comparing, and manipulating Semantic Versioning (SemVer) strings. Create and normalize versions, check equality and precedence, validate input, and work with constraints for dependency checks in your apps and packages.
isPreRelease() methodhasBuild() methodVersion class JSON serializable (#33 - Thanks @joint-tech!)Version class inheritable (#34 - Thanks @joint-tech!)preRelease sometimes ending up as an empty stringincrementPreRelease() method (#24 - Thanks @oscar-ol!)SemVer::compare() methodDetailed changelog: https://github.com/PHLAK/SemVer/compare/3.2.0...4.0.0
>= 5.6Detailed changelog: https://github.com/PHLAK/SemVer/compare/1.0.0...2.0.1
Version::parse() static constructor for parsing incomplete version strings (#11)Detailed changelog: https://github.com/PHLAK/SemVer/compare/3.1.0...3.2.0
Detailed changelog: https://github.com/PHLAK/SemVer/compare/3.0.1...3.1.0
Detailed changelog: https://github.com/PHLAK/SemVer/compare/3.0.0...3.0.1
semver() helper method__toString() method allowing a Version object it to be cast to a string (e.g. (string) $semver)Version::gt(), Version::lt(), etc.)Version::toString() method (see above for casting to string)Detailed changelog: https://github.com/PHLAK/SemVer/compare/2.0.1...3.0.0
This is the initial stable rlease. With this release comes a major refactor, including:
PHLAK\SemVerSemVer\SemVer to SemVer\Version__get() method for accessing version properties__toString() method allowing the class to act as a stringHow can I help you explore Laravel packages today?