|
1 | 1 | # Changelog
|
2 | 2 |
|
| 3 | +## [3.0.0](https://github.com/martin-georgiev/postgresql-for-doctrine/compare/v2.10.3...v3.0.0) (2025-03-30) |
| 4 | + |
| 5 | + |
| 6 | +### ⚠️🚨 BREAKING CHANGES |
| 7 | + |
| 8 | +_For detailed upgrade guide read here: [UPGRADE.md](docs/UPGRADE.md)_ |
| 9 | + |
| 10 | +#### 1. Type Preservation for PostgreSQL numerical and text arrays |
| 11 | + |
| 12 | +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. |
| 13 | + |
| 14 | +**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](https://github.com/martin-georgiev/postgresql-for-doctrine/issues/304). |
| 15 | + |
| 16 | +**Examples:** |
| 17 | +- Integer values like `1` remain integers |
| 18 | +- Float values like `1.5` remain floats |
| 19 | +- String representations like `'1'` remain strings |
| 20 | +- Boolean values like `true`/`false` remain booleans |
| 21 | +- Scientific notation like `'1.23e5'` is preserved |
| 22 | + |
| 23 | +#### 2. Refactored Exception Handling for JsonbArray |
| 24 | + |
| 25 | +The exception handling for `JsonbArray` has been refactored to be more consistent with the network types approach, providing clearer error messages and better diagnostics. |
| 26 | + |
| 27 | +**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](https://github.com/martin-georgiev/postgresql-for-doctrine/issues/311). |
| 28 | + |
| 29 | +### Features |
| 30 | + |
| 31 | +#### Added new data types |
| 32 | +* Add support for array of float types `real[]` and `double precision[]` ([#307](https://github.com/martin-georgiev/postgresql-for-doctrine/issues/307)) ([1db35ac](https://github.com/martin-georgiev/postgresql-for-doctrine/commit/1db35ac6f73b12e2691ca35fc6c63b0b8a3c4b28)) |
| 33 | +* Add support for network types `inet`, `inet[]`, `cidr`, `cidr[]`, `macaddr`, `macaddr[]` ([#310](https://github.com/martin-georgiev/postgresql-for-doctrine/issues/310)) ([ba3f9f2](https://github.com/martin-georgiev/postgresql-for-doctrine/commit/ba3f9f2833fc68f4e36ae7202396794fc43ecb63)) |
| 34 | + |
| 35 | +#### Added new functions |
| 36 | +* Add support for `any_value()` ([#323](https://github.com/martin-georgiev/postgresql-for-doctrine/issues/323)) ([19ee3db](https://github.com/martin-georgiev/postgresql-for-doctrine/commit/19ee3dbd4497195bbcd3b4df7608232de0f32b8a)) |
| 37 | +* Add support for `array_shuffle()` ([#324](https://github.com/martin-georgiev/postgresql-for-doctrine/issues/324)) ([90a9b9e](https://github.com/martin-georgiev/postgresql-for-doctrine/commit/90a9b9e84f8ec9a0dc9fd81b2d80ae48b59f2e57)) |
| 38 | +* Add support for `xmlagg()` ([#318](https://github.com/martin-georgiev/postgresql-for-doctrine/issues/318)) ([0b4db8a](https://github.com/martin-georgiev/postgresql-for-doctrine/commit/0b4db8a930964b9292e7d6f79678dbc76b9d841a)) |
| 39 | + |
| 40 | +#### Extended support in some existing functions |
| 41 | +* Add support for `NULL` value in `array_append()`, `array_replace()`, `array_prepend()`, `array_remove()` ([#322](https://github.com/martin-georgiev/postgresql-for-doctrine/issues/322)) ([396856f](https://github.com/martin-georgiev/postgresql-for-doctrine/commit/396856f81c40b2eefed801995c1fced455e8a8dd)) |
| 42 | +* Add support for `DISTINCT` and `ORDER BY` clauses to `json_agg()` and `jsonb_agg()` ([#317](https://github.com/martin-georgiev/postgresql-for-doctrine/issues/317)) ([4cdc638](https://github.com/martin-georgiev/postgresql-for-doctrine/commit/4cdc638841b23449daa9d9c0a5f9e53e15724fa3)) |
| 43 | +* Add support for `DISTINCT` clause to `array_agg()` ([#316](https://github.com/martin-georgiev/postgresql-for-doctrine/issues/316)) ([3c46021](https://github.com/martin-georgiev/postgresql-for-doctrine/commit/3c4602109754b345277e292e86ffd03200d91fa8)) |
| 44 | + |
| 45 | +### Code Refactoring |
| 46 | +* Modernise the validation in active code and the associated tests when dealing with integer arrays ([#308](https://github.com/martin-georgiev/postgresql-for-doctrine/issues/308)) ([67c344e](https://github.com/martin-georgiev/postgresql-for-doctrine/commit/67c344e11e16529049422b9fe9024310594a0392)) |
| 47 | + |
3 | 48 | ## [2.10.3](https://github.com/martin-georgiev/postgresql-for-doctrine/compare/v2.10.2...v2.10.3) (2025-03-24)
|
4 | 49 |
|
5 | 50 |
|
|
0 commit comments