3.0.0 (2025-03-30)
⚠️🚨 BREAKING CHANGES
For detailed upgrade guide read here: UPGRADE.md
1. Type Preservation for PostgreSQL numerical and text arrays
The library now attempts to strictly preserve the type of values when converting between PostgreSQL arrays and PHP arrays. This affects all array type handlers including TextArray, integer arrays, and boolean arrays.
What changed: Previously, numeric values could lose their type information during conversion (e.g., floats might become integers, string representations of numbers might become actual numbers). With version 3.0.0, the original data types are preserved in both directions. The change comes from PR #304.
Examples:
- Integer values like
1remain integers - Float values like
1.5remain floats - String representations like
'1'remain strings - Boolean values like
true/falseremain booleans - Scientific notation like
'1.23e5'is preserved
2. Refactored Exception Handling for JsonbArray
The exception handling for JsonbArray has been refactored to be more consistent with the network types approach, providing clearer error messages and better diagnostics.
What changed: Previously, generic exceptions were thrown when JSON array conversion failed. With version 3.0.0, specific InvalidJsonbArrayItemForPHPException is used with more descriptive error messages about the exact nature of the failure. The change comes from PR #311.
Features
Added new data types
- Add support for array of float types
real[]anddouble precision[](#307) (1db35ac) - Add support for network types
inet,inet[],cidr,cidr[],macaddr,macaddr[](#310) (ba3f9f2)
Added new functions
- Add support for
any_value()(#323) (19ee3db) - Add support for
array_shuffle()(#324) (90a9b9e) - Add support for
xmlagg()(#318) (0b4db8a)
Extended support in some existing functions
- Add support for
NULLvalue inarray_append(),array_replace(),array_prepend(),array_remove()(#322) (396856f) - Add support for
DISTINCTandORDER BYclauses tojson_agg()andjsonb_agg()(#317) (4cdc638) - Add support for
DISTINCTclause toarray_agg()(#316) (3c46021)