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 4 commits into
base: 4.x
Choose a base branch
from
Open

Allow static guid calls #307

wants to merge 4 commits into from

Conversation

prolic
Copy link

@prolic 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!

@codecov
Copy link

codecov bot commented Oct 29, 2020

Codecov Report

Merging #307 (bd43e91) into 4.x (01433b5) will decrease coverage by 0.11%.
The diff coverage is 88.23%.

Impacted file tree graph

@@             Coverage Diff              @@
##                4.x     #307      +/-   ##
============================================
- Coverage     95.53%   95.42%   -0.12%     
- Complexity      554      557       +3     
============================================
  Files            64       64              
  Lines          1479     1485       +6     
============================================
+ Hits           1413     1417       +4     
- Misses           66       68       +2     
Impacted Files Coverage Δ
src/Guid/Guid.php 75.00% <66.66%> (-25.00%) ⬇️
src/Uuid.php 96.51% <100.00%> (ø)

@ramsey ramsey self-requested a review as a code owner August 6, 2021 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants