SemVer

Semantic versioning helper library for PHP

MIT License

Downloads
1M
Stars
172
Committers
8

Bot releases are hidden (Show)

SemVer - v4.1.0 Latest Release

Published by PHLAK almost 2 years ago

Added

  • New incrementPreRelease() method (#24 - Thanks @oscar-ol!)
SemVer - 4.0.0

Published by PHLAK about 3 years ago

Added

  • Added SemVer::compare() method

Removed

  • Dropped support for PHP 7.1

Detailed changelog: https://github.com/PHLAK/SemVer/compare/3.2.0...4.0.0

SemVer - v2.0.1

Published by PHLAK over 4 years ago

Changed

  • Bumped required PHP version to >= 5.6

Detailed changelog: https://github.com/PHLAK/SemVer/compare/1.0.0...2.0.1

SemVer - v3.2.0

Published by PHLAK over 4 years ago

Added

  • Added Version::parse() static constructor for parsing incomplete version strings (#11)

Fixed

  • Fixed improper string conversion when initialized with a build but no pre-release

Detailed changelog: https://github.com/PHLAK/SemVer/compare/3.1.0...3.2.0

SemVer - v3.1.0

Published by PHLAK over 4 years ago

Changed

  • Enforce minimum PHP version to >=7.1
  • Miscellaneous internal cleanup/optimizations

Detailed changelog: https://github.com/PHLAK/SemVer/compare/3.0.1...3.1.0

SemVer - v3.0.1

Published by PHLAK over 4 years ago

Fixed

  • Fixed comparisons being broken for some versions with pre-releases (#14, #15)

Detailed changelog: https://github.com/PHLAK/SemVer/compare/3.0.0...3.0.1

SemVer - v3.0.0

Published by PHLAK almost 5 years ago

Added

  • Added a semver() helper method

Changed

  • Implemented the magic __toString() method allowing a Version object it to be cast to a string (e.g. (string) $semver)
  • Pre-release tags are now evaluated during comparisons (e.g. Version::gt(), Version::lt(), etc.)

Removed

  • Removed Version::toString() method (see above for casting to string)

Fixed

  • Build number would not be unset when setting the major/minor/patch version
  • Pre-release and build properties are no longer case-sensitive

Detailed changelog: https://github.com/PHLAK/SemVer/compare/2.0.1...3.0.0

SemVer - v1.0.0

Published by PHLAK about 7 years ago

This is the initial stable rlease. With this release comes a major refactor, including:

  • Re-namespaced library to PHLAK\SemVer
  • Renamed SemVer\SemVer to SemVer\Version
  • Removed explicit get methods in favor of magic __get() method for accessing version properties
  • Implemented magic __toString() method allowing the class to act as a string
  • Updated tests and documentation