Skip to content

Conversation

@Ark4ne
Copy link
Owner

@Ark4ne Ark4ne commented Nov 28, 2025

This pull request introduces support for typed arrays in resource attributes, allowing you to enforce type consistency for array elements and enabling multi-dimensional typed arrays. It adds a new of() method to the array() descriptor, an alternative arrayOf() helper, and updates documentation and tests to reflect these enhancements. Minor documentation fixes and improved PHPDoc annotations are also included.

Typed Arrays Feature

  • Added support for typed arrays in resource attributes via the new of() method on the array() descriptor, allowing you to specify the type of array elements and enabling type casting for strings, integers, floats, booleans, and enums. Also supports class references and multi-dimensional arrays. [1] [2] [3]
  • Introduced the arrayOf() helper method for concise typed array definitions. [1] [2]

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.

2 participants