All notable changes to this project will be documented in this file.
- Updated code to use PHP 8 syntax
- PHP 8.1 is now the minimum required version
- Updated dependencies to their latest versions
- 35: Allow PHP 8 installations
- PHPStan integration
- Migration to GitHub Actions thanks to Andreas Möller
- PHPUnit 8 is now the minimum required version
- Rename
VersionsCollection
toVersionCollection
Version->getPreRelease()
now explicitly returns nullable typeVersion->getBuild()
now explicitly returns nullable type- Rename
Version::fromParts()
toVersion::from()
- Rename
Version->getVersionString()
toVersion->toString()
- Use
beberlei/assert
library for input validation - Rename
Version\Comparator
namespace toVersion\Comparison
- Move
Version\Constraint
namespace toVersion\Comparison\Constraint
- Rename
ComparatorInterface
toComparator
- Rename
ComparisonConstraint
toOpeationConstraint
- Rename
ComparisonConstraintParser
toOpeationConstraintParser
- Rename component-level
Version\Exception\ExceptionInterface
toVersion\Exception\VersionException
- Move comparision-related exceptions into
Version\Comparision\Exception
namespace - Remove
-Exception
suffix from all concrete exception names - Rename
BaseExtension
toExtension
- Rename
PreRelease::fromIdentifiers()
toPreRelease::from()
- Rename
Build::fromIdentifiers()
toBuild::from()
- Rename
PreRelease::fromIdentifiersString()
toPreRelease::fromString()
- Rename
Build::fromIdentifiersString()
toBuild::fromString()
Version\VersionAwareInterface
Version\VersionAwareTrait
Version\Extension\NoPreRelease
Version\Extension\NoBuild
Version->isBuild()
VersionCollection->sort()
PreRelease->isEmpty()
PreRelease->__toString()
Build->isEmpty()
Build->__toString()
OperationConstraint::equalsTo()
named constructorOperationConstraint::notEqualTo()
named constructorOperationConstraint::greaterThan()
named constructorOperationConstraint::greaterOrEqualTo()
named constructorOperationConstraint::lessThan()
named constructorOperationConstraint::lessOrEqualTo()
named constructor- Prefix supplied in
Version::fromString()
is captured and included intoString()
result
- 20: Fix comparison when identifier of pre release contains both letters and numbers
- 24: Fix docblocks for withPreRelease() and withBuild() methods
- Support for parsing Composer version strings
- Add
VersionsCollection::isEmpty()
method - Add
VersionsCollection::toArray()
method - Add immutable
VersionsCollection::sortedAscending()
andVersionsCollection::sortedDescending()
methods; markVersionsCollection::sort()
as deprecated - Add
VersionsCollection::first()
method - Add
VersionsCollection::last()
method - Add
VersionsCollection::majorReleases()
method - Add
VersionsCollection::minorReleases()
method - Add
VersionsCollection::patchReleases()
method
VersionsCollection::matching()
fails if all the versions do not satisfy constraint; allow VersionsCollection to be empty
- Strict typing wherever possible
- 15: Relaxed version parsing
- 13: PHP 7.2 as minimum requirement
- Renamed
Version::fromElements()
toVersion::fromParts()
Version::fromParts()
requiresPreRelease
andBuild
instances- Renamed
Version::withMajorIncremented()
toVersion::incrementMajor()
- Renamed
Version::withMinorIncremented()
toVersion::incrementMinor()
- Renamed
Version::withPatchIncremented()
toVersion::incrementPatch()
- 14: Simplified modeling of extension parts - pre-release and build
- 16: Simplified Constraint modeling
- Setter method from the
VersionAwareInterface
Version::from(Major|Minor|Path|PreRelease|Build)
named constructors in favor of having a singleVersion::fromParts()
named constructor with optional parametersVersionCollection::fromArray()
; constructor with variadicVersion
arguments should be used instead
- Coding standard fixes
- Using friendsofphp/php-cs-fixer instead of abandoned fabpot/php-cs-fixer.
- 8: Mechanism for matching versions against constraints.
- 9: Support for having custom version comparison strategies.
Version::isNotEqualTo()
method.
- 5: Version is now JsonSerializable.
- 6: Capability for converting Version into array.
- Static factory method (
fromArray
) for creating VersionsCollection.
- Hooked PHP Coding Standards Fixer into the Travis CI.
- Fixed examples in README.
- Creating empty Metadata objects in favor of passing around
null
values. - 3: Fix wrong output in readme
- 4: Remove useless cloning
- Static factory methods, for example
Version::fromMajor()
,Version::fromPreRelease()
. - Methods for modifying pre-release and build information of a version.
- Static factory methods (named constructors) are used to instantiate objects instead of constructors.
increment*
methods inVersion\Version
class were renamed towith*Incremented
.Version\Identifier\PreRelease
renamed toVersion\Identifier\PreReleaseIdentifier
.Version\Identifier\Build
renamed toVersion\Identifier\BuildIdentifier
.
This release is abandoned, please consider upgrading to 2.x.