Add a note about the breaking change in getDates method when switching to Laravel 10 #8940
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Upgrade to Laravel 10 forced to move all attributes from
$dates
to$casts
. It was a breaking change as we were struggling with a lot of errors related to forms.It turned out that it was caused by the change in the getDates() method.
Example of usage of this method: https://github.com/LaravelCollective/html/blob/64ddfdcaeeb8d332bd98bef442bef81e39c3910b/src/Eloquent/FormAccessible.php#L31
Generally, I think the name of this method now is misleading a bit, as it is limited only to timestamps.
I am not the only one who noticed that -> laravel/framework#42587 (comment)