michaeldyrynda / laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models
MIT License
453 stars 48 forks source link

Fix compatibility with ramsey/uuid:^4.1 #94

Closed caiquecastro closed 4 years ago

caiquecastro commented 4 years ago

Needs to change on dyrynda/laravel-efficient-uuid package:

image

caiquecastro commented 4 years ago

Probably fix #93

michaeldyrynda commented 4 years ago

I don't think this will preserve functionality, though, as you're just resolving implicitly from string or bytes, rather than a specific version.

michaeldyrynda commented 4 years ago

That said, I don't think you can really use UUID versions 2, 3, or 5 anyway, as they require additional parameters be passed anyway.

michaeldyrynda commented 4 years ago

Fixed in b273499c41f62a8601a385f1652ba5ee584b0a5f

ziming commented 4 years ago

@michaeldyrynda

If 'ordered' is now pipe through uuid 6 (said in the release notes), will it have any conflicts or issues with my previous uuids that are already generated with Str::orderedUuid() ? Like will my uuid column still be correctly indexed in an ordered manner? with a mix of uuid 6 and Str::orderedUuid()?

https://github.com/laravel/framework/blob/7.x/src/Illuminate/Support/Str.php#L693

Hopefully you know the answer, thank you.

michaeldyrynda commented 4 years ago

It may be possible, given that the ordered UUID does not appear to actually be a proper time-ordered UUID.

It may be worth considering updating the UUID to use the new format which forms a truer representation of an ordered UUID, albeit from a draft specification.

ziming commented 4 years ago

Noted the potential breaking changes, shall restrict to 6.1.1 for this package for the time being then.