michaeldyrynda / laravel-model-uuid

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

UUID v7 support / ULID support? #119

Open atymic opened 1 year ago

atymic commented 1 year ago

Thoughts on adding v7/ulid support? https://uuid.ramsey.dev/en/stable/rfc4122/version7.html?highlight=encoding#

Happy to PR :)

michaeldyrynda commented 1 year ago

Happy to review a PR, but also considering that UUID/ULID support is coming to Laravel, need to consider what versions of Laravel we support into the future as well.

atymic commented 1 year ago

Ahh ok, do you have a link to that ticket? We're going to use v7 instead of the laravel/ramsey specific v4 ordered as its an official RFC

michaeldyrynda commented 1 year ago

This is the PR that introduced the functionality, so it's available in Laravel 9.x.

Laravel 10.x will use UUIDv7 by default.

AidasK commented 1 year ago

What about ulid? Uuid are great, but ulids are more compact ant url friendly. Can we create ulid specific mr?

atymic commented 1 year ago

PR'd #124

Looks like laravel reverted v7 becoming default due to BC breaks.

joelmellon commented 9 months ago

Laravel 9.x has ULID support as well. https://laravel.com/docs/9.x/migrations#column-method-ulid

Methods are:

atymic commented 9 months ago

@michaeldyrynda will you accept a ULID PR as well?

atymic commented 9 months ago

PR'd #127

billriess commented 3 months ago

@michaeldyrynda I know this is a little old but Laravel did revert the PR and decided not to use UUIDv7 by default. It would be nice if we could set a config to choose the default UUID instead of having to create a trait to override the default on every model.