Added casts AsCollection for hyperf/database.#7607
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces three new casting classes for the Hyperf database model layer, providing enhanced attribute casting functionality for models.
Key Changes:
- Adds a
Jsonclass with customizable JSON encoding/decoding capabilities - Adds an
Attributeclass for defining custom attribute accessors and mutators with caching options - Adds an
AsCollectionclass for casting JSON attributes to Collection instances with optional item mapping
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@huangdijia all issues resolved, do review and feel free to merge. |
1 similar comment
|
@huangdijia all issues resolved, do review and feel free to merge. |
Increase unit testing |
|
@huangdijia there's error on tests, Let's fix smarty/smarty version and i can continue |
Rebase on master |
Done, + added PHP CS fixer changes |
|
把单元测试加上,看不懂要怎么用 |
AsCollection for hyperf/database.

Adding casts to make it compatible with Hypervel and other frameworks