Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Semver Laravel Package

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.

View on GitHub
Deep Wiki
Context7
6.1.1

Fixed

  • Fix Version::parse for incomplete version string with preRelease/build (#38 - Thanks @rikonek!)
6.1.0

Changed

  • Ensured support for PHP 8.4
  • Updated development dependencies
6.0.0

Added

  • Add ability to compare versions major, minor or patch versions only (#35 - Thanks @MuhmdRaouf!)

Changed

  • Minimum supported PHP version is now 8.1
5.0.0

Added

  • Added isPreRelease() method
  • Added hasBuild() method

Changed

  • Minimum supported PHP version is now 8.0
  • Make Version class JSON serializable (#33 - Thanks @joint-tech!)
  • Make Version class inheritable (#34 - Thanks @joint-tech!)

Fixed

  • Fixed preRelease sometimes ending up as an empty string
4.1.0

Added

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

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

2.0.1

Changed

  • Bumped required PHP version to >= 5.6

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

3.2.0

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

3.1.0

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

3.0.1

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

3.0.0

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

1.0.0

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
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope