The Wayback Machine - https://web.archive.org/web/20200910202806/https://github.com/ramsey/uuid/pull/307
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

Allow static guid calls #307

Open
wants to merge 1 commit into
base: master
from
Open

Allow static guid calls #307

wants to merge 1 commit into from

Conversation

@prolic
Copy link

prolic commented Apr 7, 2020

Allow static calls to Guid::uuid4() and others

see #306

Maybe that's not the very best approach, but it should do the trick.

@prolic
Copy link
Author

prolic commented Apr 7, 2020

If you don't like this and want to block static calls on Guid instead, maybe you should also consider removing (or deprecating for now) those static methods from Uuid class as well. To me this would be kind of weird to have Uuid::uuid4() allowed but Guid::uuid4() not. If you have to go through the UuidFactory to create those, this should be the case for all then.

@ramsey
Copy link
Owner

ramsey commented Apr 8, 2020

I'm giving more thought to this. At first, I wanted to restrict calls to these static methods on the inheriting classes, but I'm giving this a second thought and will let you know soon. Thanks!

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

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