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

VERY DUMB QUESTION - Transitioning To Laravel-Model-UUID From Efficient UUID #134

Closed Jarrid closed 5 months ago

Jarrid commented 5 months ago

I'm preparing to transition from using the abandoned efficient-uuid packages to just the laravel-model-uuid package (which was already installed). I've read through the various readME's on both packages...but I was wondering if there were any gotcha's to lookout for if I was using the "default" everything for the abandoned package? It's been in place for a few years on several of my applications...obviously, I'll test....but didn't know if anyone had experienced any issues in transitioning thus far.

michaeldyrynda commented 5 months ago

The main reason the two packages were separated initially was because there wasn't a nice way to separate the behaviour (of laravel-efficient-uuid) as opt-in, where the behaviour of this package (laravel-model-uuid) was enabled by default because of package auto discovery.

Over time, Laravel made it easier to macro in the changes we needed to support efficient UUID columns, without having to override default model behaviour which would have unintended consequences in models where you weren't using efficient UUIDs.

As the two packages were cyclically dependant on each other, it made updates difficult to test, so merging them to one package now we have better control over opt-in behaviour.

The two packages shared a common root namespace, etc. so that was all maintained when the two packages were merged together, and I've not been made aware of any issues since doing so.

Jarrid commented 5 months ago

I cannot thank you enough for taking the time to explain it to me. I figured it was going to work ok, and I'm definitely going to do my own testing to make sure (gotta earn that paycheck somehow) but I know it takes time to explain things and to do it nicely. So, again, thank you. Definitely can close the issue if not already.

On Wed, Jun 5, 2024 at 7:42 PM Michael Dyrynda @.***> wrote:

The main reason the two packages were separated initially was because there wasn't a nice way to separate the behaviour (of laravel-efficient-uuid) as opt-in, where the behaviour of this package ( laravel-model-uuid) was enabled by default because of package auto discovery.

Over time, Laravel made it easier to macro in the changes we needed to support efficient UUID columns, without having to override default model behaviour which would have unintended consequences in models where you weren't using efficient UUIDs.

As the two packages were cyclically dependant on each other, it made updates difficult to test, so merging them to one package now we have better control over opt-in behaviour.

The two packages shared a common root namespace, etc. so that was all maintained when the two packages were merged together, and I've not been made aware of any issues since doing so.

— Reply to this email directly, view it on GitHub https://github.com/michaeldyrynda/laravel-model-uuid/issues/134#issuecomment-2151130280, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7ULQSG5DJDMSV3G2EK6QLZF6O55AVCNFSM6AAAAABI2ZC5I6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJRGEZTAMRYGA . You are receiving this because you authored the thread.Message ID: @.***>

-- -- J

michaeldyrynda commented 5 months ago

No problem, happy to help!