UUID v3.0.0 Release Notes

Release Date: 2015-09-28 // over 8 years ago
  • πŸš€ The 3.0.0 release represents a significant step for the ramsey/uuid library. While the simple and familiar API used in previous versions remains intact, this πŸš€ release provides greater flexibility to integrators, including the ability to inject your own number generators, UUID codecs, node and time providers, and more.

    Please note: The changelog for 3.0.0 includes all notes from the alpha and beta πŸ”– versions leading up to this release.

    βž• Added

    • βž• Add a number of generators that may be used to override the library defaults for generating random bytes (version 4) or time-based (version 1) UUIDs
      • CombGenerator to allow generation of sequential UUIDs
      • OpenSslGenerator to generate random bytes on systems where openssql_random_pseudo_bytes() is present
      • MtRandGenerator to provide a fallback in the event other random generators are not present
      • RandomLibAdapter to allow use of [ircmaxell/random-lib]
      • RandomBytesGenerator for use with PHP 7; ramsey/uuid will default to use this generator when running on PHP 7
      • Refactor time-based (version 1) UUIDs into a TimeGeneratorInterface to allow for other sources to generate version 1 UUIDs in this library
      • PeclUuidTimeGenerator and PeclUuidRandomGenerator for creating version 1 or version 4 UUIDs using the pecl-uuid extension
    • βž• Add a setTimeGenerator method on UuidFactory to override the default time generator
    • βž• Add option to enable PeclUuidTimeGenerator via FeatureSet
    • πŸ‘Œ Support GUID generation by configuring a FeatureSet to use GUIDs
    • πŸ‘ Allow UUIDs to be serialized as JSON through JsonSerializable

    πŸ”„ Changed

    • πŸ”„ Change root namespace from "Rhumsaa" to "Ramsey;" in most cases, simply making this change in your applications is the only upgrade path you will needβ€”everything else should work as expected
    • No longer consider Uuid class as final; everything is now based around interfaces and factories, allowing you to use this package as a base to implement other kinds of UUIDs with different dependencies
    • Return an object of type DegradedUuid on 32-bit systems to indicate that certain features are not available
    • 0️⃣ Default RandomLibAdapter to a medium-strength generator with [ircmaxell/random-lib]; this is configurable, so other generator strengths may be used

    βœ‚ Removed

    • βœ‚ Remove PeclUuidFactory in favor of using pecl-uuid with generators
    • βœ‚ Remove timeConverter and timeProvider properties, setters, and getters in both FeatureSet and UuidFactory as those are now exclusively used by the default TimeGenerator
    • 🚚 Move UUID [Doctrine field type] to [ramsey/uuid-doctrine]
    • 🚚 Move uuid console application to [ramsey/uuid-console]
    • βœ‚ Remove Uuid::VERSION package version constant

    πŸ›  Fixed

    • πŸ‘Œ Improve GUID support to ensure that:
      • On little endian (LE) architectures, the byte order of the first three fields is LE
      • On big endian (BE) architectures, it is the same as a GUID
      • String representation is always the same
    • πŸ›  Fix exception message for DegradedNumberConverter::fromHex()