-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support Castables #1287
Support Castables #1287
Conversation
It's getting confusing in how many ways you can do this type of thing, now that #1289 was merged recently. @binotaliu can you please rebase against current master so we're sure everything is compatible? Thank you! |
@mfn done! |
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.
LGTM, added one suggestion!
fixed |
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.
🤞🏼
Ping @barryvdh :-)
Changelog is missing the previous release though. |
### Added - Add support for custom casts that using `Castable` [barryvdh#1287 / binotaliu](barryvdh#1287) - Added Laravel 9 support [barryvdh#1297 / rcerljenko](barryvdh#1297)
### Added - Add support for custom casts that using `Castable` [#1287 / binotaliu](barryvdh/laravel-ide-helper#1287) - Added Laravel 9 support [#1297 / rcerljenko](barryvdh/laravel-ide-helper#1297)
### Added - Add support for custom casts that using `Castable` [#1287 / binotaliu](barryvdh/laravel-ide-helper#1287) - Added Laravel 9 support [#1297 / rcerljenko](barryvdh/laravel-ide-helper#1297)
### Added - Add support for custom casts that using `Castable` [#1287 / binotaliu](barryvdh/laravel-ide-helper#1287) - Added Laravel 9 support [#1297 / rcerljenko](barryvdh/laravel-ide-helper#1297)
### Added - Add support for custom casts that using `Castable` [#1287 / binotaliu](barryvdh/laravel-ide-helper#1287) - Added Laravel 9 support [#1297 / rcerljenko](barryvdh/laravel-ide-helper#1297)
### Added - Add support for custom casts that using `Castable` [barryvdh#1287 / binotaliu](barryvdh#1287) - Added Laravel 9 support [barryvdh#1297 / rcerljenko](barryvdh#1297)
Summary
This PR added support for
Castable
interface. See laravel/framework#32129 and it's documentation for details aboutCastable
.castUsing
method might return an anonymousCastsAttribute
class. In order to determine the return type, executecastUsing
is required.ContextFactory
won't detect correct context, thus I'm passing the class that implementsCastable
for context detection.Type of change
Checklist
composer fix-style