Skip to content
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

Merged
merged 1 commit into from
Jan 9, 2022
Merged

Support Castables #1287

merged 1 commit into from
Jan 9, 2022

Conversation

binotaliu
Copy link
Contributor

Summary

This PR added support for Castable interface. See laravel/framework#32129 and it's documentation for details about Castable.

  • castUsing method might return an anonymous CastsAttribute class. In order to determine the return type, execute castUsing is required.
  • When using anonymous class, seems like ContextFactory won't detect correct context, thus I'm passing the class that implements Castable for context detection.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • Existing tests have been adapted and/or new tests have been added
  • Add a CHANGELOG.md entry
  • Update the README.md
  • Code style has been fixed via composer fix-style

@mfn
Copy link
Collaborator

mfn commented Jan 9, 2022

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!

@binotaliu
Copy link
Contributor Author

@mfn done!

Copy link
Collaborator

@mfn mfn left a 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!

@binotaliu
Copy link
Contributor Author

fixed

Copy link
Collaborator

@mfn mfn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤞🏼

Ping @barryvdh :-)

@barryvdh barryvdh merged commit 744a9cf into barryvdh:master Jan 9, 2022
@barryvdh
Copy link
Owner

barryvdh commented Jan 9, 2022

Changelog is missing the previous release though.

mfn added a commit that referenced this pull request Jan 9, 2022
@mfn
Copy link
Collaborator

mfn commented Jan 9, 2022

@barryvdh good point, following up with #1294 !

barryvdh pushed a commit that referenced this pull request Jan 9, 2022
mfn added a commit to mfn/laravel-ide-helper that referenced this pull request Jan 23, 2022
### Added
- Add support for custom casts that using `Castable` [barryvdh#1287 / binotaliu](barryvdh#1287)
- Added Laravel 9 support [barryvdh#1297 / rcerljenko](barryvdh#1297)
renaforsberg824 added a commit to renaforsberg824/ide-helper-laravel-developer that referenced this pull request Oct 5, 2022
renaforsberg824 added a commit to renaforsberg824/ide-helper-laravel-developer that referenced this pull request Oct 5, 2022
### 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)
lisadeloach63 added a commit to lisadeloach63/ide-helper-reso-laravel that referenced this pull request Oct 7, 2022
lisadeloach63 added a commit to lisadeloach63/ide-helper-reso-laravel that referenced this pull request Oct 7, 2022
### 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)
sadafrangian3 pushed a commit to sadafrangian3/ide-helper-laravel that referenced this pull request Oct 18, 2022
sadafrangian3 pushed a commit to sadafrangian3/ide-helper-laravel that referenced this pull request Oct 18, 2022
### 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)
smile1130 added a commit to smile1130/laravel-IDE that referenced this pull request Jun 16, 2023
smile1130 added a commit to smile1130/laravel-IDE that referenced this pull request Jun 16, 2023
### 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)
d3v2a pushed a commit to d3v2a/laravel-ide-helper that referenced this pull request Feb 16, 2024
d3v2a pushed a commit to d3v2a/laravel-ide-helper that referenced this pull request Feb 16, 2024
d3v2a pushed a commit to d3v2a/laravel-ide-helper that referenced this pull request Feb 16, 2024
### Added
- Add support for custom casts that using `Castable` [barryvdh#1287 / binotaliu](barryvdh#1287)
- Added Laravel 9 support [barryvdh#1297 / rcerljenko](barryvdh#1297)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants