teamreflex / ChallongePHP

Package for interfacing with the Challonge API.
MIT License
24 stars 9 forks source link

spatie/data-transfer-object deprecated #33

Open Apfelwurm opened 2 months ago

Apfelwurm commented 2 months ago

Hey @kylekz , we are currently updating the library to work with php 8.3 and laravel 11, so the PR is incoming in the next days. We have noticed that spatie/data-transfer-object is deprecated now and they recommend:

Consider migrating to spatie/laravel-data or cuyz/valinor.

Do you have thoughts about how you would want to have this going forward in the future? Currently not sure if we have the capacity to tackle a migration to one of those also in the next weeks, but if we suddenly have time, it would be good to know what you think about it and that you are happy to accept the PR for that as well :)

Bye! :)

kylekz commented 2 months ago

I'm happy to accept a PR for whatever you think works better. I haven't touched PHP since 2019 so I have no idea what the go-to conventions are nowadays. valinor looks like it'd be pretty easy to migrate to, I can take a look at it if I have time this weekend.

kylekz commented 1 month ago

Got valinor in and tests passing: https://github.com/teamreflex/ChallongePHP/tree/6.0

Had to disable all the type strictness though. I have no idea what the correct types are for everything as Challonge still doesn't seem to document anything. I'm not sure this solution is very good though as it kinda relied on dynamic property assignment, which seems to be deprecated, so passing in the client to the DTO for valinor to recursively populate it feels bad, but I'm not too sure.