jessarcher / laravel-castable-data-transfer-object

Automatically cast JSON columns to rich PHP objects in Laravel using Spatie's data-transfer-object class
https://jessarcher.com/blog/casting-json-columns-to-value-objects/
MIT License
328 stars 23 forks source link

data-transfer-object is abandoned #18

Open andrenunes01 opened 1 year ago

andrenunes01 commented 1 year ago

Message in composer: package spatie/data-transfer-object is abandoned, you should avoid using it. Use spatie/laravel-data instead.

Do you intend to do this migration of packages?

jessarcher commented 1 year ago

spatie/laravel-data is already Eloquent castable so I don't think it makes sense to migrate this package.

andrenunes01 commented 1 year ago

Thank you for your help. I'll take a look at the documentation.

Promter commented 1 year ago

Hi @jessarcher, congratulations on your work, you are outstanding on the web.

I still don't understand why it doesn't make sense to migrate to a package that is not deprecated. But I wanted to see if you could update your article to Laravel 10, perhaps using an example from spatie/laravel-data, as your article is very well positioned in Google and is a reference on how to do things. Regards

jessarcher commented 1 year ago

Hi @Promter, thanks for your kind words!

In my mind, it doesn't make sense to migrate this package to Spatie's Laravel Data package because it is already castable out of the box, making the features of this package redundant.

This package is now just for those not ready to migrate yet.

That's a very good point about my article. I have added a note to the section on Spatie's DTO package referring people to Laravel Data instead. If I get time, I'll update it more thoroughly.