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

Version Laravel Package

nikolaposa/version

SemVer value object for PHP. Create versions from components or strings, access major/minor/patch plus pre-release/build metadata, compare versions (lt/gt/eq), and match against constraints for validation and dependency-style checks.

View on GitHub
Deep Wiki
Context7
4.2.0

Changed

  • Updated code to use PHP 8 syntax
  • PHP 8.1 is now the minimum required version
  • Updated dependencies to their latest versions
4.1.0
4.0.0

Changed

  • PHPUnit 8 is now the minimum required version
  • Rename VersionsCollection to VersionCollection
  • Version->getPreRelease() now explicitly returns nullable type
  • Version->getBuild() now explicitly returns nullable type
  • Rename Version::fromParts() to Version::from()
  • Rename Version->getVersionString() to Version->toString()
  • Use beberlei/assert library for input validation
  • Rename Version\Comparator namespace to Version\Comparison
  • Move Version\Constraint namespace to Version\Comparison\Constraint
  • Rename ComparatorInterface to Comparator
  • Rename ComparisonConstraint to OpeationConstraint
  • Rename ComparisonConstraintParser to OpeationConstraintParser
  • Rename component-level Version\Exception\ExceptionInterface to Version\Exception\VersionException
  • Move comparision-related exceptions into Version\Comparision\Exception namespace
  • Remove -Exception suffix from all concrete exception names
  • Rename BaseExtension to Extension
  • Rename PreRelease::fromIdentifiers() to PreRelease::from()
  • Rename Build::fromIdentifiers() to Build::from()
  • Rename PreRelease::fromIdentifiersString() to PreRelease::fromString()
  • Rename Build::fromIdentifiersString() to Build::fromString()

Removed

  • Version\VersionAwareInterface
  • Version\VersionAwareTrait
  • Version\Extension\NoPreRelease
  • Version\Extension\NoBuild
  • Version->isBuild()
  • VersionCollection->sort()
  • PreRelease->isEmpty()
  • PreRelease->__toString()
  • Build->isEmpty()
  • Build->__toString()

Added

  • OperationConstraint::equalsTo() named constructor
  • OperationConstraint::notEqualTo() named constructor
  • OperationConstraint::greaterThan() named constructor
  • OperationConstraint::greaterOrEqualTo() named constructor
  • OperationConstraint::lessThan() named constructor
  • OperationConstraint::lessOrEqualTo() named constructor
  • Prefix supplied in Version::fromString() is captured and included in toString() result
3.1.0

Added

  • Support for parsing Composer version strings
  • Add VersionsCollection::isEmpty() method
  • Add VersionsCollection::toArray() method
  • Add immutable VersionsCollection::sortedAscending() and VersionsCollection::sortedDescending() methods; mark VersionsCollection::sort() as deprecated
  • Add VersionsCollection::first() method
  • Add VersionsCollection::last() method
  • Add VersionsCollection::majorReleases() method
  • Add VersionsCollection::minorReleases() method
  • Add VersionsCollection::patchReleases() method
3.0.1

Fixed

  • VersionsCollection::matching() fails if all the versions do not satisfy constraint; allow VersionsCollection to be empty
3.0.0

Added

Changed

Removed

  • Setter method from the VersionAwareInterface
  • Version::from(Major|Minor|Path|PreRelease|Build) named constructors in favor of having a single Version::fromParts() named constructor with optional parameters
  • VersionCollection::fromArray(); constructor with variadic Version arguments should be used instead
2.2.1

Fixed

  • Coding standard fixes
  • Using friendsofphp/php-cs-fixer instead of abandoned fabpot/php-cs-fixer.
2.1.0

Added

2.0.1

Added

Fixed

2.0.0

Added

  • Static factory methods, for example Version::fromMajor(), Version::fromPreRelease().
  • Methods for modifying pre-release and build information of a version.

Backwards-incompatible changes

  • Static factory methods (named constructors) are used to instantiate objects instead of constructors.
  • increment* methods in Version\Version class were renamed to with*Incremented.
  • Version\Identifier\PreRelease renamed to Version\Identifier\PreReleaseIdentifier.
  • Version\Identifier\Build renamed to Version\Identifier\BuildIdentifier.
1.2.x

This release is abandoned, please consider upgrading to 2.x.

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport