You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1262 lines
47 KiB

3 years ago
  1. # ramsey/uuid Changelog
  2. All notable changes to this project will be documented in this file.
  3. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
  4. and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
  5. ## [Unreleased]
  6. ### Added
  7. ### Changed
  8. ### Deprecated
  9. ### Removed
  10. ### Fixed
  11. ### Security
  12. ## [4.1.1] - 2020-08-18
  13. ### Fixed
  14. * Allow use of brick/math version 0.9
  15. ## [4.1.0] - 2020-07-28
  16. ### Changed
  17. * Improve performance of `Uuid::fromString()`, `Uuid::fromBytes()`,
  18. `UuidInterface#toString()`, and `UuidInterface#getBytes()`. See PR
  19. [#324](https://github.com/ramsey/uuid/pull/324) for more information.
  20. ## [4.0.1] - 2020-03-29
  21. ### Fixed
  22. * Fix collection deserialization errors due to upstream `allowed_classes` being
  23. set to `false`. For details, see [ramsey/uuid#303](https://github.com/ramsey/uuid/issues/303)
  24. and [ramsey/collection#47](https://github.com/ramsey/collection/issues/47).
  25. ## [4.0.0] - 2020-03-22
  26. ### Added
  27. * Add support for version 6 UUIDs, as defined by <http://gh.peabody.io/uuidv6/>,
  28. including the static method `Uuid::uuid6()`, which returns a
  29. `Nonstandard\UuidV6` instance.
  30. * Add ability to generate version 2 (DCE Security) UUIDs, including the static
  31. method `Uuid::uuid2()`, which returns an `Rfc4122\UuidV2` instance.
  32. * Add classes to represent each version of RFC 4122 UUID. When generating new
  33. UUIDs or creating UUIDs from existing strings, bytes, or integers, if the UUID
  34. is an RFC 4122 variant, one of these instances will be returned:
  35. * `Rfc4122\UuidV1`
  36. * `Rfc4122\UuidV2`
  37. * `Rfc4122\UuidV3`
  38. * `Rfc4122\UuidV4`
  39. * `Rfc4122\UuidV5`
  40. * `Rfc4122\NilUuid`
  41. * Add classes to represent version 6 UUIDs, GUIDs, and nonstandard
  42. (non-RFC 4122 variant) UUIDs:
  43. * `Nonstandard\UuidV6`
  44. * `Guid\Guid`
  45. * `Nonstandard\Uuid`
  46. * Add `Uuid::fromDateTime()` to create version 1 UUIDs from instances of
  47. `\DateTimeInterface`.
  48. * The `\DateTimeInterface` instance returned by `UuidInterface::getDateTime()`
  49. (and now `Rfc4122\UuidV1::getDateTime()`) now includes microseconds, as
  50. specified by the version 1 UUID.
  51. * Add `Validator\ValidatorInterface` and `Validator\GenericValidator` to allow
  52. flexibility in validating UUIDs/GUIDs.
  53. * The default validator continues to validate UUID strings using the same
  54. relaxed validation pattern found in the 3.x series of ramsey/uuid.
  55. * Introduce `Rfc4122\Validator` that may be used for strict validation of
  56. RFC 4122 UUID strings.
  57. * Add ability to change the default validator used by `Uuid` through
  58. `FeatureSet::setValidator()`.
  59. * Add `getValidator()` and `setValidator()` to `UuidFactory`.
  60. * Add `Provider\Node\StaticNodeProvider` to assist in setting a custom static
  61. node value with the multicast bit set for version 1 UUIDs.
  62. * Add the following new exceptions:
  63. * `Exception\BuilderNotFoundException` -
  64. Thrown to indicate that no suitable UUID builder could be found.
  65. * `Exception\DateTimeException` -
  66. Thrown to indicate that the PHP DateTime extension encountered an
  67. exception/error.
  68. * `Exception\DceSecurityException` -
  69. Thrown to indicate an exception occurred while dealing with DCE Security
  70. (version 2) UUIDs.
  71. * `Exception\InvalidArgumentException` -
  72. Thrown to indicate that the argument received is not valid. This extends the
  73. built-in PHP `\InvalidArgumentException`, so there should be no BC breaks
  74. with ramsey/uuid throwing this exception, if you are catching the PHP
  75. exception.
  76. * `Exception\InvalidBytesException` -
  77. Thrown to indicate that the bytes being operated on are invalid in some way.
  78. * `Exception\NameException` -
  79. Thrown to indicate that an error occurred while attempting to hash a
  80. namespace and name.
  81. * `Exception\NodeException` -
  82. Throw to indicate that attempting to fetch or create a node ID encountered
  83. an error.
  84. * `Exception\RandomSourceException` -
  85. Thrown to indicate that the source of random data encountered an error.
  86. * `Exception\TimeSourceException` -
  87. Thrown to indicate that the source of time encountered an error.
  88. * `Exception\UnableToBuildUuidException` -
  89. Thrown to indicate a builder is unable to build a UUID.
  90. * Introduce a `Builder\FallbackBuilder`, used by `FeatureSet` to help decide
  91. whether to return a `Uuid` or `Nonstandard\Uuid` when decoding a
  92. UUID string or bytes.
  93. * Add `Rfc4122\UuidInterface` to specifically represent RFC 4122 variant UUIDs.
  94. * Add `Rfc4122\UuidBuilder` to build RFC 4122 variant UUIDs. This replaces the
  95. existing `Builder\DefaultUuidBuilder`, which is now deprecated.
  96. * Introduce `Math\CalculatorInterface` for representing calculators to perform
  97. arithmetic operations on integers.
  98. * Depend on [brick/math](https://github.com/brick/math) for the
  99. `Math\BrickMathCalculator`, which is the default calculator used by this
  100. library when math cannot be performed in native PHP due to integer size
  101. limitations. The calculator is configurable and may be changed, if desired.
  102. * Add `Converter\Number\GenericNumberConverter` and
  103. `Converter\Time\GenericTimeConverter` which will use the calculator provided
  104. to convert numbers and time to values for UUIDs.
  105. * Introduce `Type\Hexadecimal`, `Type\Integer`, `Type\Decimal`, and `Type\Time`
  106. for improved type-safety when dealing with arbitrary string values.
  107. * Add a `Type\TypeInterface` that each of the ramsey/uuid types implements.
  108. * Add `Fields\FieldsInterface` and `Rfc4122\FieldsInterface` to define
  109. field layouts for UUID variants. The implementations `Rfc4122\Fields`,
  110. `Guid\Fields`, and `Nonstandard\Fields` store the 16-byte,
  111. binary string representation of the UUID internally, and these manage
  112. conversion of the binary string into the hexadecimal field values.
  113. * Introduce `Builder\BuilderCollection` and `Provider\Node\NodeProviderCollection`.
  114. These are typed collections for providing builders and node providers to
  115. `Builder\FallbackBuilder` and `Provider\Node\FallbackNodeProvider`, respectively.
  116. * Add `Generator\NameGeneratorInterface` to support alternate methods of
  117. generating bytes for version 3 and version 5 name-based UUID. By default,
  118. ramsey/uuid uses the `Generator\DefaultNameGenerator`, which uses the standard
  119. algorithm this library has used since the beginning. You may choose to use the
  120. new `Generator\PeclUuidNameGenerator` to make use of the new
  121. `uuid_generate_md5()` and `uuid_generate_sha1()` functions in
  122. [ext-uuid version 1.1.0](https://pecl.php.net/package/uuid).
  123. ### Changed
  124. * Set minimum required PHP version to 7.2.
  125. * This library now works on 32-bit and 64-bit systems, with no degradation in
  126. functionality.
  127. * By default, the following static methods will now return specific instance
  128. types. This should not cause any BC breaks if typehints target `UuidInterface`:
  129. * `Uuid::uuid1` returns `Rfc4122\UuidV1`
  130. * `Uuid::uuid3` returns `Rfc4122\UuidV3`
  131. * `Uuid::uuid4` returns `Rfc4122\UuidV4`
  132. * `Uuid::uuid5` returns `Rfc4122\UuidV5`
  133. * Accept `Type\Hexadecimal` for the `$node` parameter for
  134. `UuidFactoryInterface::uuid1()`. This is in addition to the `int|string` types
  135. already accepted, so there are no BC breaks. `Type\Hexadecimal` is now the
  136. recommended type to pass for `$node`.
  137. * Out of the box, `Uuid::fromString()`, `Uuid::fromBytes()`, and
  138. `Uuid::fromInteger()` will now return either an `Rfc4122\UuidInterface`
  139. instance or an instance of `Nonstandard\Uuid`, depending on whether the input
  140. contains an RFC 4122 variant UUID with a valid version identifier. Both
  141. implement `UuidInterface`, so BC breaks should not occur if typehints use the
  142. interface.
  143. * Change `Uuid::getFields()` to return an instance of `Fields\FieldsInterface`.
  144. Previously, it returned an array of integer values (on 64-bit systems only).
  145. * `Uuid::getDateTime()` now returns an instance of `\DateTimeImmutable` instead
  146. of `\DateTime`.
  147. * Make the following changes to `UuidInterface`:
  148. * `getHex()` now returns a `Type\Hexadecimal` instance.
  149. * `getInteger()` now returns a `Type\Integer` instance. The `Type\Integer`
  150. instance holds a string representation of a 128-bit integer. You may then
  151. use a math library of your choice (bcmath, gmp, etc.) to operate on the
  152. string integer.
  153. * `getDateTime()` now returns `\DateTimeInterface` instead of `\DateTime`.
  154. * Add `__toString()` method.
  155. * Add `getFields()` method. It returns an instance of `Fields\FieldsInterface`.
  156. * Add the following new methods to `UuidFactoryInterface`:
  157. * `uuid2()`
  158. * `uuid6()`
  159. * `fromDateTime()`
  160. * `fromInteger()`
  161. * `getValidator()`
  162. * This library no longer throws generic exceptions. However, this should not
  163. result in BC breaks, since the new exceptions extend from built-in PHP
  164. exceptions that this library previously threw.
  165. * `Exception\UnsupportedOperationException` is now descended from
  166. `\LogicException`. Previously, it descended from `\RuntimeException`.
  167. * Change required constructor parameters for `Uuid`:
  168. * Change the first required constructor parameter for `Uuid` from
  169. `array $fields` to `Rfc4122\FieldsInterface $fields`.
  170. * Add `Converter\TimeConverterInterface $timeConverter` as the fourth
  171. required constructor parameter for `Uuid`.
  172. * Change the second required parameter of `Builder\UuidBuilderInterface::build()`
  173. from `array $fields` to `string $bytes`. Rather than accepting an array of
  174. hexadecimal strings as UUID fields, the `build()` method now expects a byte
  175. string.
  176. * Add `Converter\TimeConverterInterface $timeConverter` as the second required
  177. constructor parameter for `Rfc4122\UuidBuilder`. This also affects the
  178. now-deprecated `Builder\DefaultUuidBuilder`, since this class now inherits
  179. from `Rfc4122\UuidBuilder`.
  180. * Add `convertTime()` method to `Converter\TimeConverterInterface`.
  181. * Add `getTime()` method to `Provider\TimeProviderInterface`. It replaces the
  182. `currentTime()` method.
  183. * `Provider\Node\FallbackNodeProvider` now accepts only a
  184. `Provider\Node\NodeProviderCollection` as its constructor parameter.
  185. * `Provider\Time\FixedTimeProvider` no longer accepts an array but accepts only
  186. `Type\Time` instances.
  187. * `Provider\NodeProviderInterface::getNode()` now returns `Type\Hexadecimal`
  188. instead of `string|false|null`.
  189. * `Converter/TimeConverterInterface::calculateTime()` now returns
  190. `Type\Hexadecimal` instead of `array`. The value is the full UUID timestamp
  191. value (count of 100-nanosecond intervals since the Gregorian calendar epoch)
  192. in hexadecimal format.
  193. * Change methods in `NumberConverterInterface` to accept and return string values
  194. instead of `mixed`; this simplifies the interface and makes it consistent.
  195. * `Generator\DefaultTimeGenerator` no longer adds the variant and version bits
  196. to the bytes it returns. These must be applied to the bytes afterwards.
  197. * When encoding to bytes or decoding from bytes, `OrderedTimeCodec` now checks
  198. whether the UUID is an RFC 4122 variant, version 1 UUID. If not, it will throw
  199. an exception—`InvalidArgumentException` when using
  200. `OrderedTimeCodec::encodeBinary()` and `UnsupportedOperationException` when
  201. using `OrderedTimeCodec::decodeBytes()`.
  202. ### Deprecated
  203. The following functionality is deprecated and will be removed in ramsey/uuid
  204. 5.0.0.
  205. * The following methods from `UuidInterface` and `Uuid` are deprecated. Use their
  206. counterparts on the `Rfc4122\FieldsInterface` returned by `Uuid::getFields()`.
  207. * `getClockSeqHiAndReservedHex()`
  208. * `getClockSeqLowHex()`
  209. * `getClockSequenceHex()`
  210. * `getFieldsHex()`
  211. * `getNodeHex()`
  212. * `getTimeHiAndVersionHex()`
  213. * `getTimeLowHex()`
  214. * `getTimeMidHex()`
  215. * `getTimestampHex()`
  216. * `getVariant()`
  217. * `getVersion()`
  218. * The following methods from `Uuid` are deprecated. Use the `Rfc4122\FieldsInterface`
  219. instance returned by `Uuid::getFields()` to get the `Type\Hexadecimal` value
  220. for these fields. You may use the new `Math\CalculatorInterface::toIntegerValue()`
  221. method to convert the `Type\Hexadecimal` instances to instances of
  222. `Type\Integer`. This library provides `Math\BrickMathCalculator`, which may be
  223. used for this purpose, or you may use the arbitrary-precision arithemetic
  224. library of your choice.
  225. * `getClockSeqHiAndReserved()`
  226. * `getClockSeqLow()`
  227. * `getClockSequence()`
  228. * `getNode()`
  229. * `getTimeHiAndVersion()`
  230. * `getTimeLow()`
  231. * `getTimeMid()`
  232. * `getTimestamp()`
  233. * `getDateTime()` on `UuidInterface` and `Uuid` is deprecated. Use this method
  234. only on instances of `Rfc4122\UuidV1` or `Nonstandard\UuidV6`.
  235. * `getUrn()` on `UuidInterface` and `Uuid` is deprecated. It is available on
  236. `Rfc4122\UuidInterface` and classes that implement it.
  237. * The following methods are deprecated and have no direct replacements. However,
  238. you may obtain the same information by calling `UuidInterface::getHex()` and
  239. splitting the return value in half.
  240. * `UuidInterface::getLeastSignificantBitsHex()`
  241. * `UuidInterface::getMostSignificantBitsHex()`
  242. * `Uuid::getLeastSignificantBitsHex()`
  243. * `Uuid::getMostSignificantBitsHex()`
  244. * `Uuid::getLeastSignificantBits()`
  245. * `Uuid::getMostSignificantBits()`
  246. * `UuidInterface::getNumberConverter()` and `Uuid::getNumberConverter()` are
  247. deprecated. There is no alternative recommendation, so plan accordingly.
  248. * `Builder\DefaultUuidBuilder` is deprecated; transition to `Rfc4122\UuidBuilder`.
  249. * `Converter\Number\BigNumberConverter` is deprecated; transition to
  250. `Converter\Number\GenericNumberConverter`.
  251. * `Converter\Time\BigNumberTimeConverter` is deprecated; transition to
  252. `Converter\Time\GenericTimeConverter`.
  253. * The classes for representing and generating *degraded* UUIDs are deprecated.
  254. These are no longer necessary; this library now behaves the same on 32-bit and
  255. 64-bit systems.
  256. * `Builder\DegradedUuidBuilder`
  257. * `Converter\Number\DegradedNumberConverter`
  258. * `Converter\Time\DegradedTimeConverter`
  259. * `DegradedUuid`
  260. * The `Uuid::UUID_TYPE_IDENTIFIER` constant is deprecated. Use
  261. `Uuid::UUID_TYPE_DCE_SECURITY` instead.
  262. * The `Uuid::VALID_PATTERN` constant is deprecated. Use
  263. `Validator\GenericValidator::getPattern()` or `Rfc4122\Validator::getPattern()`
  264. instead.
  265. ### Removed
  266. * Remove the following bytes generators and recommend
  267. `Generator\RandomBytesGenerator` as a suitable replacement:
  268. * `Generator\MtRandGenerator`
  269. * `Generator\OpenSslGenerator`
  270. * `Generator\SodiumRandomGenerator`
  271. * Remove `Exception\UnsatisfiedDependencyException`. This library no longer
  272. throws this exception.
  273. * Remove the method `Provider\TimeProviderInterface::currentTime()`. Use
  274. `Provider\TimeProviderInterface::getTime()` instead.
  275. ## [4.0.0-beta2] - 2020-03-01
  276. ## Added
  277. * Add missing convenience methods for `Rfc4122\UuidV2`.
  278. * Add `Provider\Node\StaticNodeProvider` to assist in setting a custom static
  279. node value with the multicast bit set for version 1 UUIDs.
  280. ## Changed
  281. * `Provider\NodeProviderInterface::getNode()` now returns `Type\Hexadecimal`
  282. instead of `string|false|null`.
  283. ## [4.0.0-beta1] - 2020-02-27
  284. ### Added
  285. * Add `ValidatorInterface::getPattern()` to return the regular expression
  286. pattern used by the validator.
  287. * Add `v6()` helper function for version 6 UUIDs.
  288. ### Changed
  289. * Set the pattern constants on validators as `private`. Use the `getPattern()`
  290. method instead.
  291. * Change the `$node` parameter for `UuidFactoryInterface::uuid6()` to accept
  292. `null` or `Type\Hexadecimal`.
  293. * Accept `Type\Hexadecimal` for the `$node` parameter for
  294. `UuidFactoryInterface::uuid1()`. This is in addition to the `int|string` types
  295. already accepted, so there are no BC breaks. `Type\Hexadecimal` is now the
  296. recommended type to pass for `$node`.
  297. ### Removed
  298. * Remove `currentTime()` method from `Provider\Time\FixedTimeProvider` and
  299. `Provider\Time\SystemTimeProvider`; it had previously been removed from
  300. `Provider\TimeProviderInterface`.
  301. ## [4.0.0-alpha5] - 2020-02-23
  302. ### Added
  303. * Introduce `Builder\BuilderCollection` and `Provider\Node\NodeProviderCollection`.
  304. ### Changed
  305. * `Builder\FallbackBuilder` now accepts only a `Builder\BuilderCollection` as
  306. its constructor parameter.
  307. * `Provider\Node\FallbackNodeProvider` now accepts only a `Provider\Node\NodeProviderCollection`
  308. as its constructor parameter.
  309. * `Provider\Time\FixedTimeProvider` no longer accepts an array but accepts only
  310. `Type\Time` instances.
  311. ## [4.0.0-alpha4] - 2020-02-23
  312. ### Added
  313. * Add a `Type\TypeInterface` that each of the ramsey/uuid types implements.
  314. * Support version 6 UUIDs; see <http://gh.peabody.io/uuidv6/>.
  315. ### Changed
  316. * Rename `Type\IntegerValue` to `Type\Integer`. It was originally named
  317. `IntegerValue` because static analysis sees `Integer` in docblock annotations
  318. and treats it as the native `int` type. `Integer` is not a reserved word in
  319. PHP, so it should be named `Integer` for consistency with other types in this
  320. library. When using it, a class alias prevents static analysis from
  321. complaining.
  322. * Mark `Guid\Guid` and `Nonstandard\Uuid` classes as `final`.
  323. * Add `uuid6()` method to `UuidFactoryInterface`.
  324. ### Deprecated
  325. * `Uuid::UUID_TYPE_IDENTIFIER` is deprecated. Use `Uuid::UUID_TYPE_DCE_SECURITY`
  326. instead.
  327. * `Uuid::VALID_PATTERN` is deprecated. Use `Validator\GenericValidator::VALID_PATTERN`
  328. instead.
  329. ## [4.0.0-alpha3] - 2020-02-21
  330. ### Fixed
  331. * Fix microsecond rounding error on 32-bit systems.
  332. ## [4.0.0-alpha2] - 2020-02-21
  333. ### Added
  334. * Add `Uuid::fromDateTime()` to create version 1 UUIDs from instances of
  335. `\DateTimeInterface`.
  336. * Add `Generator\NameGeneratorInterface` to support alternate methods of
  337. generating bytes for version 3 and version 5 name-based UUID. By default,
  338. ramsey/uuid uses the `Generator\DefaultNameGenerator`, which uses the standard
  339. algorithm this library has used since the beginning. You may choose to use the
  340. new `Generator\PeclUuidNameGenerator` to make use of the new
  341. `uuid_generate_md5()` and `uuid_generate_sha1()` functions in ext-uuid version
  342. 1.1.0.
  343. ### Changed
  344. * Add `fromDateTime()` method to `UuidFactoryInterface`.
  345. * Change `UuidInterface::getHex()` to return a `Ramsey\Uuid\Type\Hexadecimal` instance.
  346. * Change `UuidInterface::getInteger()` to return a `Ramsey\Uuid\Type\IntegerValue` instance.
  347. ### Fixed
  348. * Round microseconds to six digits when getting DateTime from v1 UUIDs. This
  349. circumvents a needless exception for an otherwise valid time-based UUID.
  350. ## [4.0.0-alpha1] - 2020-01-22
  351. ### Added
  352. * Add `Validator\ValidatorInterface` and `Validator\GenericValidator` to allow
  353. flexibility in validating UUIDs/GUIDs.
  354. * Add ability to change the default validator used by `Uuid` through
  355. `FeatureSet::setValidator()`.
  356. * Add `getValidator()` and `setValidator()` to `UuidFactory`.
  357. * Add an internal `InvalidArgumentException` that descends from the built-in
  358. PHP `\InvalidArgumentException`. All places that used to throw
  359. `\InvalidArgumentException` now throw `Ramsey\Uuid\Exception\InvalidArgumentException`.
  360. This should not cause any BC breaks, however.
  361. * Add an internal `DateTimeException` that descends from the built-in PHP
  362. `\RuntimeException`. `Uuid::getDateTime()` may throw this exception if
  363. `\DateTimeImmutable` throws an error or exception.
  364. * Add `RandomSourceException` that descends from the built-in PHP
  365. `\RuntimeException`. `DefaultTimeGenerator`, `RandomBytesGenerator`, and
  366. `RandomNodeProvider` may throw this exception if `random_bytes()` or
  367. `random_int()` throw an error or exception.
  368. * Add `Fields\FieldsInterface` and `Rfc4122\FieldsInterface` to define
  369. field layouts for UUID variants. The implementations `Rfc4122\Fields`,
  370. `Guid\Fields`, and `Nonstandard\Fields` store the 16-byte,
  371. binary string representation of the UUID internally, and these manage
  372. conversion of the binary string into the hexadecimal field values.
  373. * Add `Rfc4122\UuidInterface` to specifically represent RFC 4122 variant UUIDs.
  374. * Add classes to represent each version of RFC 4122 UUID. When generating new
  375. UUIDs or creating UUIDs from existing strings, bytes, or integers, if the UUID
  376. is an RFC 4122 variant, one of these instances will be returned:
  377. * `Rfc4122\UuidV1`
  378. * `Rfc4122\UuidV2`
  379. * `Rfc4122\UuidV3`
  380. * `Rfc4122\UuidV4`
  381. * `Rfc4122\UuidV5`
  382. * `Rfc4122\NilUuid`
  383. * Add `Rfc4122\UuidBuilder` to build RFC 4122 variant UUIDs. This replaces the
  384. existing `Builder\DefaultUuidBuilder`, which is now deprecated.
  385. * Add ability to generate version 2 (DCE Security) UUIDs, including the static
  386. method `Uuid::uuid2()`, which returns an `Rfc4122\UuidV2` instance.
  387. * Add classes to represent GUIDs and nonstandard (non-RFC 4122 variant) UUIDs:
  388. * `Guid\Guid`
  389. * `Nonstandard\Uuid`.
  390. * Introduce a `Builder\FallbackBuilder`, used by `FeatureSet` to help decide
  391. whether to return a `Uuid` or `Nonstandard\Uuid` when decoding a
  392. UUID string or bytes.
  393. * Introduce `Type\Hexadecimal`, `Type\IntegerValue`, and `Type\Time` for
  394. improved type-safety when dealing with arbitrary string values.
  395. * Introduce `Math\CalculatorInterface` for representing calculators to perform
  396. arithmetic operations on integers.
  397. * Depend on [brick/math](https://github.com/brick/math) for the
  398. `Math\BrickMathCalculator`, which is the default calculator used by this
  399. library when math cannot be performed in native PHP due to integer size
  400. limitations. The calculator is configurable and may be changed, if desired.
  401. * Add `Converter\Number\GenericNumberConverter` and
  402. `Converter\Time\GenericTimeConverter` which will use the calculator provided
  403. to convert numbers and time to values for UUIDs.
  404. * The `\DateTimeInterface` instance returned by `UuidInterface::getDateTime()`
  405. (and now `Rfc4122\UuidV1::getDateTime()`) now includes microseconds, as
  406. specified by the version 1 UUID.
  407. ### Changed
  408. * Set minimum required PHP version to 7.2.
  409. * Add `__toString()` method to `UuidInterface`.
  410. * The `UuidInterface::getDateTime()` method now specifies `\DateTimeInterface`
  411. as the return value, rather than `\DateTime`; `Uuid::getDateTime()` now
  412. returns an instance of `\DateTimeImmutable` instead of `\DateTime`.
  413. * Add `getFields()` method to `UuidInterface`.
  414. * Add `getValidator()` method to `UuidFactoryInterface`.
  415. * Add `uuid2()` method to `UuidFactoryInterface`.
  416. * Add `convertTime()` method to `Converter\TimeConverterInterface`.
  417. * Add `getTime()` method to `Provider\TimeProviderInterface`.
  418. * Change `Uuid::getFields()` to return an instance of `Fields\FieldsInterface`.
  419. Previously, it returned an array of integer values (on 64-bit systems only).
  420. * Change the first required constructor parameter for `Uuid` from
  421. `array $fields` to `Rfc4122\FieldsInterface $fields`.
  422. * Introduce `Converter\TimeConverterInterface $timeConverter` as fourth required
  423. constructor parameter for `Uuid` and second required constructor parameter for
  424. `Builder\DefaultUuidBuilder`.
  425. * Change `UuidInterface::getInteger()` to always return a `string` value instead
  426. of `mixed`. This is a string representation of a 128-bit integer. You may then
  427. use a math library of your choice (bcmath, gmp, etc.) to operate on the
  428. string integer.
  429. * Change the second required parameter of `Builder\UuidBuilderInterface::build()`
  430. from `array $fields` to `string $bytes`. Rather than accepting an array of
  431. hexadecimal strings as UUID fields, the `build()` method now expects a byte
  432. string.
  433. * `Generator\DefaultTimeGenerator` no longer adds the variant and version bits
  434. to the bytes it returns. These must be applied to the bytes afterwards.
  435. * `Converter/TimeConverterInterface::calculateTime()` now returns
  436. `Type\Hexadecimal` instead of `array`. The value is the full UUID timestamp
  437. value (count of 100-nanosecond intervals since the Gregorian calendar epoch)
  438. in hexadecimal format.
  439. * Change methods in converter interfaces to accept and return string values
  440. instead of `mixed`; this simplifies the interface and makes it consistent:
  441. * `NumberConverterInterface::fromHex(string $hex): string`
  442. * `NumberConverterInterface::toHex(string $number): string`
  443. * `TimeConverterInterface::calculateTime(string $seconds, string $microseconds): array`
  444. * `UnsupportedOperationException` is now descended from `\LogicException`.
  445. Previously, it descended from `\RuntimeException`.
  446. * When encoding to bytes or decoding from bytes, `OrderedTimeCodec` now checks
  447. whether the UUID is an RFC 4122 variant, version 1 UUID. If not, it will throw
  448. an exception—`InvalidArgumentException` when using
  449. `OrderedTimeCodec::encodeBinary()` and `UnsupportedOperationException` when
  450. using `OrderedTimeCodec::decodeBytes()`.
  451. * Out of the box, `Uuid::fromString()`, `Uuid::fromBytes()`, and
  452. `Uuid::fromInteger()` will now return either an `Rfc4122\UuidInterface`
  453. instance or an instance of `Nonstandard\Uuid`, depending on whether the input
  454. contains an RFC 4122 variant UUID with a valid version identifier. Both
  455. implement `UuidInterface`, so BC breaks should not occur if typehints use the
  456. interface.
  457. * By default, the following static methods will now return the specific instance
  458. types. This should not cause any BC breaks if typehints target `UuidInterface`:
  459. * `Uuid::uuid1` returns `Rfc4122\UuidV1`
  460. * `Uuid::uuid3` returns `Rfc4122\UuidV3`
  461. * `Uuid::uuid4` returns `Rfc4122\UuidV4`
  462. * `Uuid::uuid5` returns `Rfc4122\UuidV5`
  463. ### Deprecated
  464. The following functionality is deprecated and will be removed in ramsey/uuid
  465. 5.0.0.
  466. * The following methods from `UuidInterface` and `Uuid` are deprecated. Use their
  467. counterparts on the `Rfc4122\FieldsInterface` returned by `Uuid::getFields()`.
  468. * `getClockSeqHiAndReservedHex()`
  469. * `getClockSeqLowHex()`
  470. * `getClockSequenceHex()`
  471. * `getFieldsHex()`
  472. * `getNodeHex()`
  473. * `getTimeHiAndVersionHex()`
  474. * `getTimeLowHex()`
  475. * `getTimeMidHex()`
  476. * `getTimestampHex()`
  477. * `getVariant()`
  478. * `getVersion()`
  479. * The following methods from `Uuid` are deprecated. Use the `Rfc4122\FieldsInterface`
  480. instance returned by `Uuid::getFields()` to get the `Type\Hexadecimal` value
  481. for these fields, and then use the arbitrary-precision arithmetic library of
  482. your choice to convert them to string integers.
  483. * `getClockSeqHiAndReserved()`
  484. * `getClockSeqLow()`
  485. * `getClockSequence()`
  486. * `getNode()`
  487. * `getTimeHiAndVersion()`
  488. * `getTimeLow()`
  489. * `getTimeMid()`
  490. * `getTimestamp()`
  491. * `getDateTime()` on `UuidInterface` and `Uuid` is deprecated. Use this method
  492. only on instances of `Rfc4122\UuidV1`.
  493. * `getUrn()` on `UuidInterface` and `Uuid` is deprecated. It is available on
  494. `Rfc4122\UuidInterface` and classes that implement it.
  495. * The following methods are deprecated and have no direct replacements. However,
  496. you may obtain the same information by calling `UuidInterface::getHex()` and
  497. splitting the return value in half.
  498. * `UuidInterface::getLeastSignificantBitsHex()`
  499. * `UuidInterface::getMostSignificantBitsHex()`
  500. * `Uuid::getLeastSignificantBitsHex()`
  501. * `Uuid::getMostSignificantBitsHex()`
  502. * `Uuid::getLeastSignificantBits()`
  503. * `Uuid::getMostSignificantBits()`
  504. * `UuidInterface::getNumberConverter()` and `Uuid::getNumberConverter()` are
  505. deprecated. There is no alternative recommendation, so plan accordingly.
  506. * `Builder\DefaultUuidBuilder` is deprecated; transition to
  507. `Rfc4122\UuidBuilder`.
  508. * `Converter\Number\BigNumberConverter` is deprecated; transition to
  509. `Converter\Number\GenericNumberConverter`.
  510. * `Converter\Time\BigNumberTimeConverter` is deprecated; transition to
  511. `Converter\Time\GenericTimeConverter`.
  512. * `Provider\TimeProviderInterface::currentTime()` is deprecated; transition to
  513. the `getTimestamp()` method on the same interface.
  514. * The classes for representing and generating *degraded* UUIDs are deprecated.
  515. These are no longer necessary; this library now behaves the same on 32-bit and
  516. 64-bit PHP.
  517. * `Builder\DegradedUuidBuilder`
  518. * `Converter\Number\DegradedNumberConverter`
  519. * `Converter\Time\DegradedTimeConverter`
  520. * `DegradedUuid`
  521. ### Removed
  522. * Remove the following bytes generators and recommend
  523. `Generator\RandomBytesGenerator` as a suitable replacement:
  524. * `Generator\MtRandGenerator`
  525. * `Generator\OpenSslGenerator`
  526. * `Generator\SodiumRandomGenerator`
  527. * Remove `Exception\UnsatisfiedDependencyException`. This library no longer
  528. throws this exception.
  529. ## [3.9.3] - 2020-02-20
  530. ### Fixed
  531. * For v1 UUIDs, round down for timestamps so that microseconds do not bump the
  532. timestamp to the next second.
  533. As an example, consider the case of timestamp `1` with `600000` microseconds
  534. (`1.600000`). This is the first second after midnight on January 1, 1970, UTC.
  535. Previous versions of this library had a bug that would round this to `2`, so
  536. the rendered time was `1970-01-01 00:00:02`. This was incorrect. Despite
  537. having `600000` microseconds, the time should not round up to the next second.
  538. Rather, the time should be `1970-01-01 00:00:01.600000`. Since this version of
  539. ramsey/uuid does not support microseconds, the microseconds are dropped, and
  540. the time is `1970-01-01 00:00:01`. No rounding should occur.
  541. ## [3.9.2] - 2019-12-17
  542. ### Fixed
  543. * Check whether files returned by `/sys/class/net/*/address` are readable
  544. before attempting to read them. This avoids a PHP warning that was being
  545. emitted on hosts that do not grant permission to read these files.
  546. ## [3.9.1] - 2019-12-01
  547. ### Fixed
  548. * Fix `RandomNodeProvider` behavior on 32-bit systems. The `RandomNodeProvider`
  549. was converting a 6-byte string to a decimal number, which is a 48-bit,
  550. unsigned integer. This caused problems on 32-bit systems and has now been
  551. resolved.
  552. ## [3.9.0] - 2019-11-30
  553. ### Added
  554. * Add function API as convenience. The functions are available in the
  555. `Ramsey\Uuid` namespace.
  556. * `v1(int|string|null $node = null, int|null $clockSeq = null): string`
  557. * `v3(string|UuidInterface $ns, string $name): string`
  558. * `v4(): string`
  559. * `v5(string|UuidInterface $ns, string $name): string`
  560. ### Changed
  561. * Use paragonie/random-lib instead of ircmaxell/random-lib. This is a
  562. non-breaking change.
  563. * Use a high-strength generator by default, when using `RandomLibAdapter`. This
  564. is a non-breaking change.
  565. ### Deprecated
  566. These will be removed in ramsey/uuid version 4.0.0:
  567. * `MtRandGenerator`, `OpenSslGenerator`, and `SodiumRandomGenerator` are
  568. deprecated in favor of using the default `RandomBytesGenerator`.
  569. ### Fixed
  570. * Set `ext-json` as a required dependency in `composer.json`.
  571. * Use `PHP_OS` instead of `php_uname()` when determining the system OS, for
  572. cases when `php_uname()` is disabled for security reasons.
  573. ## [3.8.0] - 2018-07-19
  574. ### Added
  575. * Support discovery of MAC addresses on FreeBSD systems
  576. * Use a polyfill to provide PHP ctype functions when running on systems where the
  577. ctype functions are not part of the PHP build
  578. * Disallow a trailing newline character when validating UUIDs
  579. * Annotate thrown exceptions for improved IDE hinting
  580. ## [3.7.3] - 2018-01-19
  581. ### Fixed
  582. * Gracefully handle cases where `glob()` returns false when searching
  583. `/sys/class/net/*/address` files on Linux
  584. * Fix off-by-one error in `DefaultTimeGenerator`
  585. ### Security
  586. * Switch to `random_int()` from `mt_rand()` for better random numbers
  587. ## [3.7.2] - 2018-01-13
  588. ### Fixed
  589. * Check sysfs on Linux to determine the node identifier; this provides a
  590. reliable way to identify the node on Docker images, etc.
  591. ## [3.7.1] - 2017-09-22
  592. ### Fixed
  593. * Set the multicast bit for random nodes, according to RFC 4122, §4.5
  594. ### Security
  595. * Use `random_bytes()` when generating random nodes
  596. ## [3.7.0] - 2017-08-04
  597. ### Added
  598. * Add the following UUID version constants:
  599. * `Uuid::UUID_TYPE_TIME`
  600. * `Uuid::UUID_TYPE_IDENTIFIER`
  601. * `Uuid::UUID_TYPE_HASH_MD5`
  602. * `Uuid::UUID_TYPE_RANDOM`
  603. * `Uuid::UUID_TYPE_HASH_SHA1`
  604. ## [3.6.1] - 2017-03-26
  605. ### Fixed
  606. * Optimize UUID string decoding by using `str_pad()` instead of `sprintf()`
  607. ## [3.6.0] - 2017-03-18
  608. ### Added
  609. * Add `InvalidUuidStringException`, which is thrown when attempting to decode an
  610. invalid string UUID; this does not introduce any BC issues, since the new
  611. exception inherits from the previously used `InvalidArgumentException`
  612. ### Fixed
  613. * Improve memory usage when generating large quantities of UUIDs (use `str_pad()`
  614. and `dechex()` instead of `sprintf()`)
  615. ## [3.5.2] - 2016-11-22
  616. ### Fixed
  617. * Improve test coverage
  618. ## [3.5.1] - 2016-10-02
  619. ### Fixed
  620. * Fix issue where the same UUIDs were not being treated as equal when using
  621. mixed cases
  622. ## [3.5.0] - 2016-08-02
  623. ### Added
  624. * Add `OrderedTimeCodec` to store UUID in an optimized way for InnoDB
  625. ### Fixed
  626. * Fix invalid node generation in `RandomNodeProvider`
  627. * Avoid multiple unnecessary system calls by caching failed attempt to retrieve
  628. system node
  629. ## [3.4.1] - 2016-04-23
  630. ### Fixed
  631. * Fix test that violated a PHP CodeSniffer rule, breaking the build
  632. ## [3.4.0] - 2016-04-23
  633. ### Added
  634. * Add `TimestampFirstCombCodec` and `TimestampLastCombCodec` codecs to provide
  635. the ability to generate [COMB sequential UUIDs] with the timestamp encoded as
  636. either the first 48 bits or the last 48 bits
  637. * Improve logic of `CombGenerator` for COMB sequential UUIDs
  638. ## [3.3.0] - 2016-03-22
  639. ### Security
  640. * Drop the use of OpenSSL as a fallback and use [paragonie/random_compat] to
  641. support `RandomBytesGenerator` in versions of PHP earlier than 7.0;
  642. this addresses and fixes the [collision issue]
  643. ## [3.2.0] - 2016-02-17
  644. ### Added
  645. * Add `SodiumRandomGenerator` to allow use of the [PECL libsodium extension] as
  646. a random bytes generator when creating UUIDs
  647. ## [3.1.0] - 2015-12-17
  648. ### Added
  649. * Implement the PHP `Serializable` interface to provide the ability to
  650. serialize/unserialize UUID objects
  651. ## [3.0.1] - 2015-10-21
  652. ### Added
  653. * Adopt the [Contributor Code of Conduct] for this project
  654. ## [3.0.0] - 2015-09-28
  655. The 3.0.0 release represents a significant step for the ramsey/uuid library.
  656. While the simple and familiar API used in previous versions remains intact, this
  657. release provides greater flexibility to integrators, including the ability to
  658. inject your own number generators, UUID codecs, node and time providers, and
  659. more.
  660. *Please note: The changelog for 3.0.0 includes all notes from the alpha and beta
  661. versions leading up to this release.*
  662. ### Added
  663. * Add a number of generators that may be used to override the library defaults
  664. for generating random bytes (version 4) or time-based (version 1) UUIDs
  665. * `CombGenerator` to allow generation of sequential UUIDs
  666. * `OpenSslGenerator` to generate random bytes on systems where
  667. `openssql_random_pseudo_bytes()` is present
  668. * `MtRandGenerator` to provide a fallback in the event other random generators
  669. are not present
  670. * `RandomLibAdapter` to allow use of [ircmaxell/random-lib]
  671. * `RandomBytesGenerator` for use with PHP 7; ramsey/uuid will default to use
  672. this generator when running on PHP 7
  673. * Refactor time-based (version 1) UUIDs into a `TimeGeneratorInterface` to
  674. allow for other sources to generate version 1 UUIDs in this library
  675. * `PeclUuidTimeGenerator` and `PeclUuidRandomGenerator` for creating version
  676. 1 or version 4 UUIDs using the pecl-uuid extension
  677. * Add a `setTimeGenerator` method on `UuidFactory` to override the default time
  678. generator
  679. * Add option to enable `PeclUuidTimeGenerator` via `FeatureSet`
  680. * Support GUID generation by configuring a `FeatureSet` to use GUIDs
  681. * Allow UUIDs to be serialized as JSON through `JsonSerializable`
  682. ### Changed
  683. * Change root namespace from "Rhumsaa" to "Ramsey;" in most cases, simply
  684. making this change in your applications is the only upgrade path you will
  685. need—everything else should work as expected
  686. * No longer consider `Uuid` class as `final`; everything is now based around
  687. interfaces and factories, allowing you to use this package as a base to
  688. implement other kinds of UUIDs with different dependencies
  689. * Return an object of type `DegradedUuid` on 32-bit systems to indicate that
  690. certain features are not available
  691. * Default `RandomLibAdapter` to a medium-strength generator with
  692. [ircmaxell/random-lib]; this is configurable, so other generator strengths may
  693. be used
  694. ### Removed
  695. * Remove `PeclUuidFactory` in favor of using pecl-uuid with generators
  696. * Remove `timeConverter` and `timeProvider` properties, setters, and getters in
  697. both `FeatureSet` and `UuidFactory` as those are now exclusively used by the
  698. default `TimeGenerator`
  699. * Move UUID [Doctrine field type] to [ramsey/uuid-doctrine]
  700. * Move `uuid` console application to [ramsey/uuid-console]
  701. * Remove `Uuid::VERSION` package version constant
  702. ### Fixed
  703. * Improve GUID support to ensure that:
  704. * On little endian (LE) architectures, the byte order of the first three
  705. fields is LE
  706. * On big endian (BE) architectures, it is the same as a GUID
  707. * String representation is always the same
  708. * Fix exception message for `DegradedNumberConverter::fromHex()`
  709. ## [3.0.0-beta1] - 2015-08-31
  710. ### Fixed
  711. * Improve GUID support to ensure that:
  712. * On little endian (LE) architectures, the byte order of the first three
  713. fields is LE
  714. * On big endian (BE) architectures, it is the same as a GUID
  715. * String representation is always the same
  716. * Fix exception message for `DegradedNumberConverter::fromHex()`
  717. ## [3.0.0-alpha3] - 2015-07-28
  718. ### Added
  719. * Enable use of custom `TimeGenerator` implementations
  720. * Add a `setTimeGenerator` method on `UuidFactory` to override the default time
  721. generator
  722. * Add option to enable `PeclUuidTimeGenerator` via `FeatureSet`
  723. ### Removed
  724. * Remove `timeConverter` and `timeProvider` properties, setters, and getters in
  725. both `FeatureSet` and `UuidFactory` as those are now exclusively used by the
  726. default `TimeGenerator`
  727. ## [3.0.0-alpha2] - 2015-07-28
  728. ### Added
  729. * Refactor time-based (version 1) UUIDs into a `TimeGeneratorInterface` to allow
  730. for other sources to generate version 1 UUIDs in this library
  731. * Add `PeclUuidTimeGenerator` and `PeclUuidRandomGenerator` for creating version
  732. 1 or version 4 UUIDs using the pecl-uuid extension
  733. * Add `RandomBytesGenerator` for use with PHP 7. ramsey/uuid will default to use
  734. this generator when running on PHP 7
  735. ### Changed
  736. * Default `RandomLibAdapter` to a medium-strength generator with
  737. [ircmaxell/random-lib]; this is configurable, so other generator strengths may
  738. be used
  739. ### Removed
  740. * Remove `PeclUuidFactory` in favor of using pecl-uuid with generators
  741. ## [3.0.0-alpha1] - 2015-07-16
  742. ### Added
  743. * Allow dependency injection through `UuidFactory` and/or extending `FeatureSet`
  744. to override any package defaults
  745. * Add a number of generators that may be used to override the library defaults:
  746. * `CombGenerator` to allow generation of sequential UUIDs
  747. * `OpenSslGenerator` to generate random bytes on systems where
  748. `openssql_random_pseudo_bytes()` is present
  749. * `MtRandGenerator` to provide a fallback in the event other random generators
  750. are not present
  751. * `RandomLibAdapter` to allow use of [ircmaxell/random-lib]
  752. * Support GUID generation by configuring a `FeatureSet` to use GUIDs
  753. * Allow UUIDs to be serialized as JSON through `JsonSerializable`
  754. ### Changed
  755. * Change root namespace from "Rhumsaa" to "Ramsey;" in most cases, simply
  756. making this change in your applications is the only upgrade path you will
  757. need—everything else should work as expected
  758. * No longer consider `Uuid` class as `final`; everything is now based around
  759. interfaces and factories, allowing you to use this package as a base to
  760. implement other kinds of UUIDs with different dependencies
  761. * Return an object of type `DegradedUuid` on 32-bit systems to indicate that
  762. certain features are not available
  763. ### Removed
  764. * Move UUID [Doctrine field type] to [ramsey/uuid-doctrine]
  765. * Move `uuid` console application to [ramsey/uuid-console]
  766. * Remove `Uuid::VERSION` package version constant
  767. ## [2.9.0] - 2016-03-22
  768. ### Security
  769. * Drop the use of OpenSSL as a fallback and use [paragonie/random_compat] to
  770. support `RandomBytesGenerator` in versions of PHP earlier than 7.0;
  771. this addresses and fixes the [collision issue]
  772. ## [2.8.4] - 2015-12-17
  773. ### Added
  774. * Add support for symfony/console v3 in the `uuid` CLI application
  775. ## [2.8.3] - 2015-08-31
  776. ### Fixed
  777. * Fix exception message in `Uuid::calculateUuidTime()`
  778. ## [2.8.2] - 2015-07-23
  779. ### Fixed
  780. * Ensure the release tag makes it into the rhumsaa/uuid package
  781. ## [2.8.1] - 2015-06-16
  782. ### Fixed
  783. * Use `passthru()` and output buffering in `getIfconfig()`
  784. * Cache the system node in a static variable so that we process it only once per
  785. runtime
  786. ## [2.8.0] - 2014-11-09
  787. ### Added
  788. * Add static `fromInteger()` method to create UUIDs from string integer or
  789. `Moontoast\Math\BigNumber`
  790. ### Fixed
  791. * Improve Doctrine conversion to Uuid or string for the ramsey/uuid [Doctrine field type]
  792. ## [2.7.4] - 2014-10-29
  793. ### Fixed
  794. * Change loop in `generateBytes()` from `foreach` to `for`
  795. ## [2.7.3] - 2014-08-27
  796. ### Fixed
  797. * Fix upper range for `mt_rand` used in version 4 UUIDs
  798. ## [2.7.2] - 2014-07-28
  799. ### Changed
  800. * Upgrade to PSR-4 autoloading
  801. ## [2.7.1] - 2014-02-19
  802. ### Fixed
  803. * Move moontoast/math and symfony/console to require-dev
  804. * Support symfony/console 2.3 (LTS version)
  805. ## [2.7.0] - 2014-01-31
  806. ### Added
  807. * Add `Uuid::VALID_PATTERN` constant containing a UUID validation regex pattern
  808. ## [2.6.1] - 2014-01-27
  809. ### Fixed
  810. * Fix bug where `uuid` console application could not find the Composer
  811. autoloader when installed in another project
  812. ## [2.6.0] - 2014-01-17
  813. ### Added
  814. * Introduce `uuid` console application for generating and decoding UUIDs from
  815. CLI (run `./bin/uuid` for details)
  816. * Add `Uuid::getInteger()` to retrieve a `Moontoast\Math\BigNumber`
  817. representation of the 128-bit integer representing the UUID
  818. * Add `Uuid::getHex()` to retrieve the hexadecimal representation of the UUID
  819. * Use `netstat` on Linux to capture the node for a version 1 UUID
  820. * Require moontoast/math as part of the regular package requirements
  821. ## [2.5.0] - 2013-10-30
  822. ### Added
  823. * Use `openssl_random_pseudo_bytes()`, if available, to generate random bytes
  824. ## [2.4.0] - 2013-07-29
  825. ### Added
  826. * Return `null` from `Uuid::getVersion()` if the UUID isn't an RFC 4122 variant
  827. * Support string UUIDs without dashes passed to `Uuid::fromString()`
  828. ## [2.3.0] - 2013-07-16
  829. ### Added
  830. * Support creation of UUIDs from bytes with `Uuid::fromBytes()`
  831. ## [2.2.0] - 2013-07-04
  832. ### Added
  833. * Add `Doctrine\UuidType::requiresSQLCommentHint()` method
  834. ## [2.1.2] - 2013-07-03
  835. ### Fixed
  836. * Fix cases where the system node was coming back with uppercase hexadecimal
  837. digits; this ensures that case in the node is converted to lowercase
  838. ## [2.1.1] - 2013-04-29
  839. ### Fixed
  840. * Fix bug in `Uuid::isValid()` where the NIL UUID was not reported as valid
  841. ## [2.1.0] - 2013-04-15
  842. ### Added
  843. * Allow checking the validity of a UUID through the `Uuid::isValid()` method
  844. ## [2.0.0] - 2013-02-11
  845. ### Added
  846. * Support UUID generation on 32-bit platforms
  847. ### Changed
  848. * Mark `Uuid` class `final`
  849. * Require moontoast/math on 64-bit platforms for
  850. `Uuid::getLeastSignificantBits()` and `Uuid::getMostSignificantBits()`; the
  851. integers returned by these methods are *unsigned* 64-bit integers and
  852. unsupported even on 64-bit builds of PHP
  853. * Move `UnsupportedOperationException` to the `Exception` subnamespace
  854. ## [1.1.2] - 2012-11-29
  855. ### Fixed
  856. * Relax [Doctrine field type] conversion rules for UUIDs
  857. ## [1.1.1] - 2012-08-27
  858. ### Fixed
  859. * Remove `final` keyword from `Uuid` class
  860. ## [1.1.0] - 2012-08-06
  861. ### Added
  862. * Support ramsey/uuid UUIDs as a Doctrine Database Abstraction Layer (DBAL)
  863. field mapping type
  864. ## [1.0.0] - 2012-07-19
  865. ### Added
  866. * Support generation of version 1, 3, 4, and 5 UUIDs
  867. [comb sequential uuids]: http://www.informit.com/articles/article.aspx?p=25862&seqNum=7
  868. [paragonie/random_compat]: https://github.com/paragonie/random_compat
  869. [collision issue]: https://github.com/ramsey/uuid/issues/80
  870. [contributor code of conduct]: https://github.com/ramsey/uuid/blob/master/.github/CODE_OF_CONDUCT.md
  871. [pecl libsodium extension]: http://pecl.php.net/package/libsodium
  872. [ircmaxell/random-lib]: https://github.com/ircmaxell/RandomLib
  873. [doctrine field type]: http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html
  874. [ramsey/uuid-doctrine]: https://github.com/ramsey/uuid-doctrine
  875. [ramsey/uuid-console]: https://github.com/ramsey/uuid-console
  876. [unreleased]: https://github.com/ramsey/uuid/compare/4.1.1...HEAD
  877. [4.1.1]: https://github.com/ramsey/uuid/compare/4.1.0...4.1.1
  878. [4.1.0]: https://github.com/ramsey/uuid/compare/4.0.1...4.1.0
  879. [4.0.1]: https://github.com/ramsey/uuid/compare/4.0.0...4.0.1
  880. [4.0.0]: https://github.com/ramsey/uuid/compare/4.0.0-beta2...4.0.0
  881. [4.0.0-beta2]: https://github.com/ramsey/uuid/compare/4.0.0-beta1...4.0.0-beta2
  882. [4.0.0-beta1]: https://github.com/ramsey/uuid/compare/4.0.0-alpha5...4.0.0-beta1
  883. [4.0.0-alpha5]: https://github.com/ramsey/uuid/compare/4.0.0-alpha4...4.0.0-alpha5
  884. [4.0.0-alpha4]: https://github.com/ramsey/uuid/compare/4.0.0-alpha3...4.0.0-alpha4
  885. [4.0.0-alpha3]: https://github.com/ramsey/uuid/compare/4.0.0-alpha2...4.0.0-alpha3
  886. [4.0.0-alpha2]: https://github.com/ramsey/uuid/compare/4.0.0-alpha1...4.0.0-alpha2
  887. [4.0.0-alpha1]: https://github.com/ramsey/uuid/compare/3.9.3...4.0.0-alpha1
  888. [3.9.3]: https://github.com/ramsey/uuid/compare/3.9.2...3.9.3
  889. [3.9.2]: https://github.com/ramsey/uuid/compare/3.9.1...3.9.2
  890. [3.9.1]: https://github.com/ramsey/uuid/compare/3.9.0...3.9.1
  891. [3.9.0]: https://github.com/ramsey/uuid/compare/3.8.0...3.9.0
  892. [3.8.0]: https://github.com/ramsey/uuid/compare/3.7.3...3.8.0
  893. [3.7.3]: https://github.com/ramsey/uuid/compare/3.7.2...3.7.3
  894. [3.7.2]: https://github.com/ramsey/uuid/compare/3.7.1...3.7.2
  895. [3.7.1]: https://github.com/ramsey/uuid/compare/3.7.0...3.7.1
  896. [3.7.0]: https://github.com/ramsey/uuid/compare/3.6.1...3.7.0
  897. [3.6.1]: https://github.com/ramsey/uuid/compare/3.6.0...3.6.1
  898. [3.6.0]: https://github.com/ramsey/uuid/compare/3.5.2...3.6.0
  899. [3.5.2]: https://github.com/ramsey/uuid/compare/3.5.1...3.5.2
  900. [3.5.1]: https://github.com/ramsey/uuid/compare/3.5.0...3.5.1
  901. [3.5.0]: https://github.com/ramsey/uuid/compare/3.4.1...3.5.0
  902. [3.4.1]: https://github.com/ramsey/uuid/compare/3.4.0...3.4.1
  903. [3.4.0]: https://github.com/ramsey/uuid/compare/3.3.0...3.4.0
  904. [3.3.0]: https://github.com/ramsey/uuid/compare/3.2.0...3.3.0
  905. [3.2.0]: https://github.com/ramsey/uuid/compare/3.1.0...3.2.0
  906. [3.1.0]: https://github.com/ramsey/uuid/compare/3.0.1...3.1.0
  907. [3.0.1]: https://github.com/ramsey/uuid/compare/3.0.0...3.0.1
  908. [3.0.0]: https://github.com/ramsey/uuid/compare/3.0.0-beta1...3.0.0
  909. [3.0.0-beta1]: https://github.com/ramsey/uuid/compare/3.0.0-alpha3...3.0.0-beta1
  910. [3.0.0-alpha3]: https://github.com/ramsey/uuid/compare/3.0.0-alpha2...3.0.0-alpha3
  911. [3.0.0-alpha2]: https://github.com/ramsey/uuid/compare/3.0.0-alpha1...3.0.0-alpha2
  912. [3.0.0-alpha1]: https://github.com/ramsey/uuid/compare/2.9.0...3.0.0-alpha1
  913. [2.9.0]: https://github.com/ramsey/uuid/compare/2.8.4...2.9.0
  914. [2.8.4]: https://github.com/ramsey/uuid/compare/2.8.3...2.8.4
  915. [2.8.3]: https://github.com/ramsey/uuid/compare/2.8.2...2.8.3
  916. [2.8.2]: https://github.com/ramsey/uuid/compare/2.8.1...2.8.2
  917. [2.8.1]: https://github.com/ramsey/uuid/compare/2.8.0...2.8.1
  918. [2.8.0]: https://github.com/ramsey/uuid/compare/2.7.4...2.8.0
  919. [2.7.4]: https://github.com/ramsey/uuid/compare/2.7.3...2.7.4
  920. [2.7.3]: https://github.com/ramsey/uuid/compare/2.7.2...2.7.3
  921. [2.7.2]: https://github.com/ramsey/uuid/compare/2.7.1...2.7.2
  922. [2.7.1]: https://github.com/ramsey/uuid/compare/2.7.0...2.7.1
  923. [2.7.0]: https://github.com/ramsey/uuid/compare/2.6.1...2.7.0
  924. [2.6.1]: https://github.com/ramsey/uuid/compare/2.6.0...2.6.1
  925. [2.6.0]: https://github.com/ramsey/uuid/compare/2.5.0...2.6.0
  926. [2.5.0]: https://github.com/ramsey/uuid/compare/2.4.0...2.5.0
  927. [2.4.0]: https://github.com/ramsey/uuid/compare/2.3.0...2.4.0
  928. [2.3.0]: https://github.com/ramsey/uuid/compare/2.2.0...2.3.0
  929. [2.2.0]: https://github.com/ramsey/uuid/compare/2.1.2...2.2.0
  930. [2.1.2]: https://github.com/ramsey/uuid/compare/2.1.1...2.1.2
  931. [2.1.1]: https://github.com/ramsey/uuid/compare/2.1.0...2.1.1
  932. [2.1.0]: https://github.com/ramsey/uuid/compare/2.0.0...2.1.0
  933. [2.0.0]: https://github.com/ramsey/uuid/compare/1.1.2...2.0.0
  934. [1.1.2]: https://github.com/ramsey/uuid/compare/1.1.1...1.1.2
  935. [1.1.1]: https://github.com/ramsey/uuid/compare/1.1.0...1.1.1
  936. [1.1.0]: https://github.com/ramsey/uuid/compare/1.0.0...1.1.0
  937. [1.0.0]: https://github.com/ramsey/uuid/commits/1.0.0