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] improve the API of Uuid #36052

Closed
wants to merge 1 commit into from
Closed

Conversation

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Mar 12, 2020

Q A
Branch? master
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -
@nicolas-grekas nicolas-grekas added this to the next milestone Mar 12, 2020
@@ -100,27 +95,23 @@ public function getType(): int
return uuid_type($this->uuid);
}

public function getVariant(): int

This comment has been minimized.

Copy link
@nicolas-grekas

nicolas-grekas Mar 12, 2020

Author Member

Nobody uses variants, isn't it? Let's drop it to make our API simpler.
uuid_variant() still exists for ppl that need it.

}

public function getTime(): int
public function getTime(): float

This comment has been minimized.

Copy link
@nicolas-grekas

nicolas-grekas Mar 12, 2020

Author Member

I don't get why uuid_time is limited to an integer timestamp while the UUID time is a 60bit number. Let's return a float instead, with subsecond info.


public function getMac(): string

This comment has been minimized.

Copy link
@nicolas-grekas

nicolas-grekas Mar 12, 2020

Author Member

Same as getVariant: nobody needs this IMHO - ppl that do can still use uuid_mac()

@nicolas-grekas nicolas-grekas force-pushed the nicolas-grekas:uuid branch from ad146b1 to 31ec854 Mar 12, 2020
@nicolas-grekas

This comment has been minimized.

Copy link
Member Author

nicolas-grekas commented Mar 13, 2020

Tests need symfony/polyfill#241 to be green.

@nicolas-grekas nicolas-grekas deleted the nicolas-grekas:uuid branch Mar 13, 2020
@lyrixx

This comment has been minimized.

Copy link
Member

lyrixx commented Mar 13, 2020

@nicolas-grekas I guess you missed click. You closed the PR

@nicolas-grekas

This comment has been minimized.

Copy link
Member Author

nicolas-grekas commented Mar 13, 2020

Actually not, I'd like to split the PR in chunks (and provide a maybe different end result :))
Check #36053 for the 1st step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.