aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/ramsey
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ramsey')
-rw-r--r--vendor/ramsey/uuid/CHANGELOG.md20
-rw-r--r--vendor/ramsey/uuid/LICENSE2
-rw-r--r--vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php2
-rw-r--r--vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php2
-rw-r--r--vendor/ramsey/uuid/src/DegradedUuid.php2
-rw-r--r--vendor/ramsey/uuid/src/Uuid.php6
6 files changed, 26 insertions, 8 deletions
diff --git a/vendor/ramsey/uuid/CHANGELOG.md b/vendor/ramsey/uuid/CHANGELOG.md
index f2f1548e2..57b7f5ea7 100644
--- a/vendor/ramsey/uuid/CHANGELOG.md
+++ b/vendor/ramsey/uuid/CHANGELOG.md
@@ -21,6 +21,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Security
+## [3.9.3] - 2020-02-20
+
+### Fixed
+
+* For v1 UUIDs, round down for timestamps so that microseconds do not bump the
+ timestamp to the next second.
+
+ As an example, consider the case of timestamp `1` with `600000` microseconds
+ (`1.600000`). This is the first second after midnight on January 1, 1970, UTC.
+ Previous versions of this library had a bug that would round this to `2`, so
+ the rendered time was `1970-01-01 00:00:02`. This was incorrect. Despite
+ having `600000` microseconds, the time should not round up to the next second.
+ Rather, the time should be `1970-01-01 00:00:01.600000`. Since this version of
+ ramsey/uuid does not support microseconds, the microseconds are dropped, and
+ the time is `1970-01-01 00:00:01`. No rounding should occur.
+
+
## [3.9.2] - 2019-12-17
### Fixed
@@ -591,7 +608,8 @@ versions leading up to this release.*
[ramsey/uuid-doctrine]: https://github.com/ramsey/uuid-doctrine
[ramsey/uuid-console]: https://github.com/ramsey/uuid-console
-[unreleased]: https://github.com/ramsey/uuid/compare/3.9.2...HEAD
+[unreleased]: https://github.com/ramsey/uuid/compare/3.9.3...HEAD
+[3.9.3]: https://github.com/ramsey/uuid/compare/3.9.2...3.9.3
[3.9.2]: https://github.com/ramsey/uuid/compare/3.9.1...3.9.2
[3.9.1]: https://github.com/ramsey/uuid/compare/3.9.0...3.9.1
[3.9.0]: https://github.com/ramsey/uuid/compare/3.8.0...3.9.0
diff --git a/vendor/ramsey/uuid/LICENSE b/vendor/ramsey/uuid/LICENSE
index f6f7e8043..b2aa4b587 100644
--- a/vendor/ramsey/uuid/LICENSE
+++ b/vendor/ramsey/uuid/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2012-2019 Ben Ramsey <ben@benramsey.com>
+Copyright (c) 2012-2020 Ben Ramsey <ben@benramsey.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php b/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php
index 270a1e75b..9d13af70c 100644
--- a/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php
+++ b/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php
@@ -17,7 +17,7 @@ use Ramsey\Uuid\Exception\InvalidUuidStringException;
use Ramsey\Uuid\UuidInterface;
/**
- * TimestampLastCombCodec encodes and decodes COMB UUIDs which have the timestamp as the first 48 bits.
+ * TimestampFirstCombCodec encodes and decodes COMB UUIDs which have the timestamp as the first 48 bits.
* To be used with MySQL, PostgreSQL, Oracle.
*/
class TimestampFirstCombCodec extends StringCodec
diff --git a/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php b/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php
index c851792f3..23cf1640b 100644
--- a/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php
+++ b/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php
@@ -28,7 +28,7 @@ interface TimeConverterInterface
*
* @param string $seconds
* @param string $microSeconds
- * @return string[] An array guaranteed to contain `low`, `mid`, and `high` keys
+ * @return string[] An array guaranteed to contain `low`, `mid`, and `hi` keys
* @throws UnsatisfiedDependencyException if called on a 32-bit system and
* `Moontoast\Math\BigNumber` is not present
* @link http://tools.ietf.org/html/rfc4122#section-4.2.2
diff --git a/vendor/ramsey/uuid/src/DegradedUuid.php b/vendor/ramsey/uuid/src/DegradedUuid.php
index 26697615c..4e11272d0 100644
--- a/vendor/ramsey/uuid/src/DegradedUuid.php
+++ b/vendor/ramsey/uuid/src/DegradedUuid.php
@@ -40,7 +40,7 @@ class DegradedUuid extends Uuid
$ts = new BigNumber($time, 20);
$ts->subtract('122192928000000000');
$ts->divide('10000000.0');
- $ts->round();
+ $ts->floor();
$unixTime = $ts->getValue();
return new DateTime("@{$unixTime}");
diff --git a/vendor/ramsey/uuid/src/Uuid.php b/vendor/ramsey/uuid/src/Uuid.php
index 38fbd5ed6..f2912b48a 100644
--- a/vendor/ramsey/uuid/src/Uuid.php
+++ b/vendor/ramsey/uuid/src/Uuid.php
@@ -350,8 +350,8 @@ class Uuid implements UuidInterface
throw new UnsupportedOperationException('Not a time-based UUID');
}
- $unixTime = ($this->getTimestamp() - 0x01b21dd213814000) / 1e7;
- $unixTime = number_format($unixTime, 0, '', '');
+ $unixTimeNanoseconds = $this->getTimestamp() - 0x01b21dd213814000;
+ $unixTime = ($unixTimeNanoseconds - $unixTimeNanoseconds % 1e7) / 1e7;
return new DateTime("@{$unixTime}");
}
@@ -676,7 +676,7 @@ class Uuid implements UuidInterface
*/
public static function isValid($uuid)
{
- $uuid = str_replace(['urn:', 'uuid:', '{', '}'], '', $uuid);
+ $uuid = str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}'], '', $uuid);
if ($uuid == self::NIL) {
return true;