Skip to content

Conversation

@norberttech
Copy link
Member

Resolves: #xxx

Change Log


Added

  • added BoolArrayConverter for PostgreSQL BOOL[] type
  • IntArrayConverter for PostgreSQL INT2[], INT4[], INT8[] types
  • FloatArrayConverter for PostgreSQL FLOAT4[], FLOAT8[] types
  • TextArrayConverter for PostgreSQL TEXT[], VARCHAR[] types
  • UuidArrayConverter for PostgreSQL UUID[] type
  • JsonArrayConverter for PostgreSQL JSON[], JSONB[] types

Fixed

  • monolithic ArrayConverter in favor of type-specific converters
  • syntax highlighing on website

Changed

  • array converters to throw ValueConversionException for invalid element types instead of silently converting

Removed

  • symfony/polyfill-83 dependency

Deprecated

Security

- removed monolithic ArrayConverter in favor of type-specific
converters
  - added BoolArrayConverter for PostgreSQL BOOL[] type
  - added IntArrayConverter for PostgreSQL INT2[], INT4[], INT8[] types
  - added FloatArrayConverter for PostgreSQL FLOAT4[], FLOAT8[] types
  - added TextArrayConverter for PostgreSQL TEXT[], VARCHAR[] types
  - added UuidArrayConverter for PostgreSQL UUID[] type
  - added JsonArrayConverter for PostgreSQL JSON[], JSONB[] types
  - changed array converters to throw ValueConversionException for
invalid element types instead of silently converting
  - added unit tests for each new array converter
  - removed old ArrayConverterTest.php (unit and integration)
  - changed ValueConverters.php to register 6 type-specific array
converters
  - added "Array Types" section to
documentation/components/libs/postgresql.md
  - changed documentation/components/libs/postgresql/client-types.md to
document array converter validation behavior
  - fixed syntax highlighing on website
  - removed symfony/polyfill-83 dependency
@norberttech norberttech added this to the 0.30.0 milestone Dec 20, 2025
@norberttech
Copy link
Member Author

So this PR is pretty much removing flow-php/types dependency from flow-php/postgresql.
Initially I wrongly assumed that we can based the php/postgresql types conversion through flow-php/types, however flow types are source, not destination types.
Thats why passing flow type to typed(mixed $value, Type $type) didn't work as expected.
What we really needed is passing PostgreSqlType as second argument (for which I created a dedicated DSL functions).

On top of that array handling was terrible... Now all types from PostgreSqlType enum should be handled properly.

We will need to add the most popular extensions as well, like PostGis for example and their types but that can come later.

Last but not least, the data we are fetching from database is no longer automatically converted to any of PHP types that are ambiguous.

This pretty much removes all "magic", fallbacking to exception rather than passing empty string, nulls, or automagically casted values

@codecov
Copy link

codecov bot commented Dec 20, 2025

Codecov Report

❌ Patch coverage is 92.54902% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.76%. Comparing base (0edd897) to head (08bddcd).
⚠️ Report is 5 commits behind head on 1.x.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x    #2095      +/-   ##
==========================================
+ Coverage   83.53%   83.76%   +0.22%     
==========================================
  Files        1133     1143      +10     
  Lines       40606    40605       -1     
==========================================
+ Hits        33919    34011      +92     
+ Misses       6687     6594      -93     
Components Coverage Δ
etl 90.52% <ø> (+0.89%) ⬆️
cli 85.76% <ø> (ø)
lib-array-dot 95.00% <ø> (ø)
lib-azure-sdk 60.01% <ø> (ø)
lib-doctrine-dbal-bulk 95.14% <ø> (ø)
lib-filesystem 80.44% <ø> (ø)
lib-types 88.98% <ø> (+1.51%) ⬆️
lib-parquet 68.25% <ø> (ø)
lib-parquet-viewer 83.04% <ø> (ø)
lib-snappy 90.65% <ø> (+0.46%) ⬆️
bridge-filesystem-async-aws 90.95% <ø> (ø)
bridge-filesystem-azure 89.38% <ø> (ø)
bridge-monolog-http 96.89% <ø> (ø)
bridge-openapi-specification 91.50% <ø> (ø)
symfony-http-foundation 72.32% <ø> (ø)
adapter-chartjs 86.33% <ø> (ø)
adapter-csv 89.30% <ø> (ø)
adapter-doctrine 91.50% <ø> (ø)
adapter-elasticsearch 97.02% <ø> (ø)
adapter-google-sheet 97.05% <ø> (ø)
adapter-http 65.94% <ø> (ø)
adapter-json 89.69% <ø> (ø)
adapter-logger 83.33% <ø> (ø)
adapter-meilisearch 97.77% <ø> (ø)
adapter-parquet 79.92% <ø> (ø)
adapter-text 86.84% <ø> (ø)
adapter-xml 82.66% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@norberttech norberttech merged commit 410c76c into 1.x Dec 20, 2025
22 checks passed
@norberttech norberttech deleted the bug/postgresql-types branch December 20, 2025 17:43
@github-project-automation github-project-automation bot moved this from Todo to Done in Roadmap Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants