Ramsey Uuid Versions Save

:snowflake: A PHP library for generating universally unique identifiers (UUIDs).

4.7.5

5 months ago

Fixed

  • Protect against UUIDv7 collisions within the same millisecond, as reported in #518 and fixed in #522.
  • Improve the return type hint for UuidInterface::compareTo().

4.7.4

1 year ago

Fixed

  • Allow brick/math version ^0.11.
  • Add explicit Stringable interface to UuidInterface.
  • Fix namespace conflict reported in #490.
  • Fix unserialize error with OrderedTimeCodec reported in #494.

4.7.3

1 year ago

Fixed

  • The original 4.7.2 tag accidentally pointed to a commit in the 5.x branch. I have replaced the 4.7.2 tag with a new tag that points to the correct commit, but I am creating this tag to help notify users and automated processes who might have already updated to the bad 4.7.2 tag (#487).

4.7.2

1 year ago

Fixed

  • Amend Psalm assertion syntax on Uuid::isValid() to prevent incorrect type inference (#486).
  • Re-tagged with the correct commit hash, since the first tag was pointing to a commit in the 5.x branch (#487).

4.7.1

1 year ago

Fixed

  • Allow the use of ramsey/collection ^2.0 with ramsey/uuid.

4.7.0

1 year ago

Added

  • Add Uuid::fromHexadecimal() and UuidFactory::fromHexadecimal(). These methods are not required by the interfaces.

Fixed

  • Ignore MAC addresses consisting of all zeroes (i.e., 00:00:00:00:00:00).

3.9.7

1 year ago

Fixed

  • Add #[ReturnTypeWillChange] to Uuid::jsonSerialize() method.

4.6.0

1 year ago

Added

  • Add support for version 8, custom UUIDs, as defined in draft-ietf-uuidrev-rfc4122bis-00, section 5.8. While still an Internet-Draft, version 8 is stable and unlikely to change in any way that breaks compatibility.
    • Use Ramsey\Uuid\Uuid::uuid8() to generate version 8 UUIDs.
    • Version 8 UUIDs are of type Ramsey\Uuid\Rfc4122\UuidV8.
    • The constant Ramsey\Uuid\Uuid::UUID_TYPE_CUSTOM exists for version 8 UUIDs.

Fixed

  • Ensure monotonicity of version 7 UUIDs.

4.5.1

1 year ago

Fixed

  • Update RFC 4122 validator to recognize version 6 and 7 UUIDs.

4.5.0

1 year ago

Added

  • Promote version 6, reordered time UUIDs from the Nonstandard namespace to the Rfc4122 namespace. Version 6 UUIDs are defined in New UUID Formats, section 5.1. 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. 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.
  • Add Ramsey\Uuid\Converter\Time\UnixTimeConverter and Ramsey\Uuid\Generator\UnixTimeGenerator to support version 7 UUID generation.
  • Add support for max UUIDs through Ramsey\Uuid\Uuid::MAX and Ramsey\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 of Ramsey\Uuid\Rfc4122\UuidV6.
  • Ramsey\Uuid\Uuid::UUID_TYPE_PEABODY; use Ramsey\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 a 2 when called on a nil UUID.