Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromnicolas-grekas:uuid-no-variant
Mar 14, 2020

Conversation

nicolas-grekas
Copy link
Member

QA
Branch?master
Bug fix?no
New feature?no
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

Let's simplify the API. One less concept to grasp.
I think there are no use cases for variants in modern tech, check:
https://en.wikipedia.org/wiki/Universally_unique_identifier#Variants

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commitaed93cd intosymfony:masterMar 14, 2020
nicolas-grekas added a commit that referenced this pull requestMar 14, 2020
This PR was merged into the 5.1-dev branch.Discussion----------[Uid] use one class per type of UUID| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | -(embeds#36064 for now)Would it make sense to have one class per type of UUID?This aligns the type system and UUID types, so that one could type hint e.g. `UuidV4 $uuid`.This PR does so. `UuidV1`/2/3/4 and `NullUuid` all extend the base `Uuid` class, which provides common methods and the factories needed to create each king of UUID.This means we don't need the `getType()` nor the `isNull()` methods since they can be replaced by instanceof checks.As expected,  `getTime()` and `getMac()` then now exist only on the `UuidV1` class - no need for any version check nor any `LogicException` anymore.Each type is guaranteed to contain a UUID that matches its class' type. The base `Uuid` class is used for the "no type" type.Commits-------62f6ac4 [Uid] use one class per type of UUID
@nicolas-grekasnicolas-grekas deleted the uuid-no-variant branchMarch 14, 2020 13:57
@nicolas-grekasnicolas-grekas modified the milestones:next,5.1May 4, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@jakzaljakzaljakzal approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
5.1
Development

Successfully merging this pull request may close these issues.

4 participants
@nicolas-grekas@fabpot@jakzal@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp