Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Uid] remove Uuid::getVariant() #36064

Merged
merged 1 commit into from
Mar 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Symfony/Component/Uid/Tests/UuidTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ public function testExtraMethods()
{
$uuid = new Uuid(self::A_UUID_V1);

$this->assertSame(Uuid::VARIANT_DCE, $uuid->getVariant());
$this->assertSame(1583245966.746458, $uuid->getTime());
$this->assertSame('3499710062d0', $uuid->getMac());
$this->assertSame(self::A_UUID_V1, (string) $uuid);
Expand Down
10 changes: 0 additions & 10 deletions src/Symfony/Component/Uid/Uuid.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ class Uuid implements \JsonSerializable
public const TYPE_4 = UUID_TYPE_RANDOM;
public const TYPE_5 = UUID_TYPE_SHA1;

public const VARIANT_NCS = UUID_VARIANT_NCS;
public const VARIANT_DCE = UUID_VARIANT_DCE;
public const VARIANT_MICROSOFT = UUID_VARIANT_MICROSOFT;
public const VARIANT_OTHER = UUID_VARIANT_OTHER;

// https://tools.ietf.org/html/rfc4122#section-4.1.4
// 0x01b21dd213814000 is the number of 100-ns intervals between the
// UUID epoch 1582-10-15 00:00:00 and the Unix epoch 1970-01-01 00:00:00.
Expand Down Expand Up @@ -113,11 +108,6 @@ public function getType(): int
return uuid_type($this->uuid);
}

public function getVariant(): int
{
return uuid_variant($this->uuid);
}

public function getTime(): float
{
if (self::TYPE_1 !== $t = uuid_type($this->uuid)) {
Expand Down