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 UUIDsOpenSslGenerator
to generate random bytes on systems whereopenssql_random_pseudo_bytes()
is presentMtRandGenerator
to provide a fallback in the event other random generators are not presentRandomLibAdapter
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
andPeclUuidRandomGenerator
for creating version 1 or version 4 UUIDs using the pecl-uuid extension
- β Add a
setTimeGenerator
method onUuidFactory
to override the default time generator - β Add option to enable
PeclUuidTimeGenerator
viaFeatureSet
- π 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 asfinal
; 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
andtimeProvider
properties, setters, and getters in bothFeatureSet
andUuidFactory
as those are now exclusively used by the defaultTimeGenerator
- π 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()
- β 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