Bringing back the "getDates()" previous functionality #47951
Closed
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.
Before Laravel 10 this method gave us a list of all date-type attributes including both - explicitly set up in the model and timestamps. Since version 10 it returns only those 2 timestamps or empty array and it breaks some functionalities.
Example:
https://github.com/LaravelCollective/html/blob/64ddfdcaeeb8d332bd98bef442bef81e39c3910b/src/Eloquent/FormAccessible.php#L31
#42587 (comment)
My proposal is just to bring back the previous functionality. There is no more the $dates attribute, but according to the L10 upgrade guide, it was just kind of an alias.
If not, then maybe a separate method?