Skip to content

Support generic array operations and chained builders

Choose a tag to compare

@rkrx rkrx released this 15 Sep 09:47
· 1 commit to main since this release

Improved generic type inference for rkrMerge, rkrAddKey, and rkrRemoveKey. Template arguments are now preserved until PHPStan resolves their concrete types, allowing array shapes to carry through nested operations and chained builder calls.

  • Correctly resolve template parameters used as array keys while preserving support for literal key names.
  • Add regression tests for template substitution, nested merges, chained builders, overwrites, optional keys, and key removal.
  • Document generic builder usage with a practical example.
  • Update the Composer requirement for PHPStan from ^2.1 to >=2.1.