UUID v4.5.1 Release Notes
Release Date: 2022-09-16 // about 2 years ago-
๐ Fixed
- โก๏ธ Update RFC 4122 validator to recognize version 6 and 7 UUIDs.
Previous changes from v4.5.0
-
โ Added
- Promote version 6, reordered time UUIDs from the
Nonstandard
namespace to theRfc4122
namespace. Version 6 UUIDs are defined in [New UUID Formats, section 5.1][version6]. While still an Internet-Draft version 6 is stable and unlikely to change in any way that breaks compatibility. - โ Add support for version 7, Unix Epoch time UUIDs, as defined in
[New UUID Formats, section 5.2][version7]. While still an Internet-Draft,
version 7 is stable and unlikely to change in any way that breaks compatibility.
- Use
Ramsey\Uuid\Uuid::uuid7()
to generate version 7 UUIDs. - Version 7 UUIDs are of type
Ramsey\Uuid\Rfc4122\UuidV7
. - The constant
Ramsey\Uuid\Uuid::UUID_TYPE_UNIX_TIME
exists for version 7 UUIDs.
- Use
- โ Add
Ramsey\Uuid\Converter\Time\UnixTimeConverter
andRamsey\Uuid\Generator\UnixTimeGenerator
to support version 7 UUID generation. - โ Add support for [max UUIDs][] through
Ramsey\Uuid\Uuid::MAX
andRamsey\Uuid\Rfc4122\MaxUuid
.
๐ Changed
- The lowest version of brick/math allowed is now
^0.8.8
.
๐ Deprecated
๐ The following will be removed in ramsey/uuid 5.0.0:
- ๐
Ramsey\Uuid\Nonstandard\UuidV6
is deprecated in favor ofRamsey\Uuid\Rfc4122\UuidV6
. Ramsey\Uuid\Uuid::UUID_TYPE_PEABODY
; useRamsey\Uuid\Uuid::UUID_TYPE_REORDERED_TIME
instead.
๐ Fixed
- For
Ramsey\Uuid\Uuid::isValid()
, Psalm now asserts the UUID is a non-empty-string when it is valid. - Nil UUIDs are properly treated as RFC 4122 variants, and
getVariant()
now returns a2
when called on a nil UUID.
- Promote version 6, reordered time UUIDs from the