Skip to content

Conversation

@zds-s
Copy link
Contributor

@zds-s zds-s commented Aug 6, 2025

  • Add ArrayObject class extending BaseArrayObject with Arrayable and JsonSerializable interfaces
  • Add AsArrayObject castable for automatic JSON encoding/decoding to ArrayObject instances
  • Add collect() method to convert ArrayObject to Hyperf Collection
  • Add comprehensive unit tests covering casting, serialization, and array operations
  • Support null values and invalid JSON handling

🤖 Generated with Claude Code

- Add ArrayObject class extending BaseArrayObject with Arrayable and JsonSerializable interfaces
- Add AsArrayObject castable for automatic JSON encoding/decoding to ArrayObject instances
- Add collect() method to convert ArrayObject to Hyperf Collection
- Add comprehensive unit tests covering casting, serialization, and array operations
- Support null values and invalid JSON handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
huangdijia
huangdijia previously approved these changes Aug 6, 2025
@limingxinleo limingxinleo changed the title feat: add ArrayObject cast support for database models Added caster Hyperf\Database\Model\Casts\AsArrayObject for ArrayObject. Aug 26, 2025
@limingxinleo limingxinleo merged commit df5b180 into hyperf:master Aug 26, 2025
71 checks passed
@zds-s zds-s deleted the feature/array-object-cast branch August 26, 2025 05:20
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