PackageTrack
Sign in Get early access

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 2024
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 8
  1. v3.0.0 01 Apr 2024
    Release notes

    Changed

    • Required PHP version to 8.1.
    Open source →
  2. v2.0.2 23 Mar 2023
    Release notes

    Fixed

    • #6: Calling copy on a stable version attached an empty pre-release identity to the new version.
    Open source →
  3. v2.0.1 15 Sep 2022
    Release notes

    Added

    • Support for | as constraint OR operator. Now constraints like ^2|^3 are recognised correctly.
    • Dedicated sorting methods.
    Open source →
  4. v2.0.0 13 Sep 2022
    Release notes

    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() and Version::compareString() methods to use with usort().
    • ->isNotEqual(Version) and Version::notEqual(string) comparison methods.
    • Version::parseOrNull() and Constraint::parseOrNull() methods for cases when exception-less execution is more desirable.
    • API documentation.

    Breaking changes

    • Instance level comparison methods are now only accept Version parameters. String based version comparison is still available with static comparison methods.
    • VersionFormatException was renamed to SemverException.
    Open source →
  5. v1.2.0 21 Mar 2022
    Release notes
    • Increased the required PHP version to 7.1
    Open source →
  6. v1.1.0 09 Jan 2022
    Release notes
    • Added copy() functionality.
    • Fixed pre-release regex matching.
    Open source →
  7. v1.0.1 03 Jan 2020
    Release notes

    Added increment functionality

    Open source →
  8. v1.0.0 25 Dec 2019

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive