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

[10.x] Introduce methods for handling nil and max UUIDs #49850

Closed
wants to merge 1 commit into from
Closed

[10.x] Introduce methods for handling nil and max UUIDs #49850

wants to merge 1 commit into from

Conversation

shamimulalam
Copy link
Contributor

This pull request introduces isNilUuid and isMaxUuid methods to enhance Laravel's UUID handling capabilities. These methods offer a clear and expressive API for working with UUIDs in various scenarios. isNilUuid facilitates error handling and represents uninitialized states, while isMaxUuid is useful for range checks and scenarios where UUIDs need to be within specific bounds.

These additions align with Laravel's commitment to clean, readable code and provide developers with valuable tools for UUID manipulation. The methods are implemented with simplicity and efficiency in mind, contributing to a more robust and expressive UUID handling framework within Laravel.

I believe that these methods will bring tangible benefits to developers working with UUIDs in Laravel applications, promoting code clarity and aligning with best practices in UUID handling. I look forward to your feedback and collaboration on this enhancement.

@driesvints driesvints changed the title Introduce methods for handling nil and max UUIDs [10.x] Introduce methods for handling nil and max UUIDs Jan 26, 2024
@driesvints
Copy link
Member

Although the features seem reasonable, I do feel the Str class is getting a little polluted here with all of the UUID stuff. Might be good to, in due time, create a separate class for all the UUID handling. Not saying that has to be in this PR.

@shamimulalam
Copy link
Contributor Author

@driesvints i'm agree with you. I was also thinking about a wrapper for Uuid::Nil and Uuid::Max into our laravel side but i didn't add those cause the same reason. :)

@taylorotwell
Copy link
Member

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!

If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

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

Successfully merging this pull request may close these issues.

3 participants