-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Add more native type hints #626
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be a lot of fun. Nice changes. Like it.
@remkobrenters I was curious is there anything you want me to do with this PR or is it worth merging this into |
Sorry for my open end on this one. As I understood (maybe incorrectly) this is the first of a set of changes regarding improvement of types right? As maybe we want to group a couple of these MR's into a branch that results in a bigger bump of the project on this topic (allows also some room for like breaking changes and a major version upgrade if needed). Or is this overkill and would you like to just perform them as smaller updates over the time? |
I would lean towards the option of smaller improvement as separate PR's, as I can think of two downsides of a single large set of changes:
I also recognise both you and @stephangroen as the maintainers and therefore can make a decision either way. |
Too much credits for me here :) I am just a preparation step to make life a bit easier for @stephangroen. |
Thank you again for all of your efforts @DannyvdSluijs. Both you and @remkobrenters have put quite some time and effort into this library/package. I'm very grateful for your efforts and both of you deserve the credits :) I'm also more fan of the smaller updates. This keeps it simple and more clear. It's time the code moves toward type hints. Let's continue on this path. |
This PR follows up on #625 and adds more type hints into the library. I did a couple of test runs in order to validate all works as it should.
My current focus is to first add type hints to all the non generated bits and bobs of code and at some point update the generating code to update all the models with the types, such as adding the hints for:
protected array $fillable = [ ... ]
protected string $url
protected string $primaryKey