Skip to content

4.0.0-alpha2

Pre-release
Pre-release
Compare
Choose a tag to compare
@ramsey ramsey released this 21 Feb 07:49
4.0.0-alpha2
1396eaf

Added

  • Add Uuid::fromDateTime() to create version 1 UUIDs from instances of
    \DateTimeInterface.
  • Add Generator\NameGeneratorInterface to support alternate methods of
    generating bytes for version 3 and version 5 name-based UUID. By default,
    ramsey/uuid uses the Generator\DefaultNameGenerator, which uses the standard
    algorithm this library has used since the beginning. You may choose to use the
    new Generator\PeclUuidNameGenerator to make use of the new
    uuid_generate_md5() and uuid_generate_sha1() functions in ext-uuid version
    1.1.0.

Changed

  • Add fromDateTime() method to UuidFactoryInterface.
  • Change UuidInterface::getHex() to return a Ramsey\Uuid\Type\Hexadecimal instance.
  • Change UuidInterface::getInteger() to return a Ramsey\Uuid\Type\IntegerValue instance.

Fixed

  • Round microseconds to six digits when getting DateTime from v1 UUIDs. This
    circumvents a needless exception for an otherwise valid time-based UUID.