Skip to content

fix: failed reads keep the database error, reads that write are refused - #2634

Merged
norberttech merged 1 commit into
1.xfrom
schema-probe-errors
Sep 15, 2026
Merged

norberttech merged 1 commit into
1.xfrom
schema-probe-errors

Conversation

@norberttech

Copy link
Copy Markdown
Member

Resolves: #xxx

Change Log


Added

  • flow-php/postgresql - Traverser hands the whole query to handlers registered for ParseResult
  • flow-php/postgresql - Statements::assertReadOnlySelect() and SelectStatement::hasDataModifyingCte() / hasOrderBy()
  • flow-php/postgresql - pagination configs accept param() placeholders
  • flow-php/postgresql - declare_cursor() accepts a parsed query
  • flow-php/etl - SchemaNotDerivableException::probeRefused() keeps the database error as its cause

Fixed

  • flow-php/etl-adapter-postgresql - a failed read throws the database's own error
  • flow-php/etl-adapter-postgresql - from_pgsql_*() refuse a query that writes before any round trip
  • flow-php/etl-adapter-postgresql - a failed from_pgsql_cursor() read rolls back its own transaction
  • flow-php/etl-adapter-postgresql - from_pgsql_limit_offset() requires the query's own ORDER BY
  • flow-php/etl-adapter-doctrine - a refused schema probe keeps the driver error as its cause
  • flow-php/postgresql - sql_to_*_query() helpers and pagination modifiers refuse a query that writes
  • flow-php/postgresql - declare_cursor() over a non-SELECT no longer crashes the process
  • flow-php/postgresql - SelectStatement::hasIntoClause() sees SELECT ... INTO in a set operation
  • flow-php/postgresql - describe() errors point at the caller's SQL

Changed

  • flow-php/etl-adapter-postgresql - extractors parse the query once per read and page with one SQL string

Removed

Deprecated

Security

- from_pgsql_*() and from_dbal_*() rethrow the database's own error; a refused probe keeps it as the cause
- from_pgsql_*() refuse anything but one read-only SELECT or VALUES before any query
- pgsql extractors parse once per read and page with one SQL string and new parameters
- sql_to_*_query() helpers and pagination modifiers refuse queries that write
- a failed from_pgsql_cursor() read rolls back its own transaction
- from_pgsql_limit_offset() requires the query's own ORDER BY
@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.48943% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.55%. Comparing base (b6eac82) to head (eee9e91).
⚠️ Report is 1 commits behind head on 1.x.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##                1.x    #2634      +/-   ##
============================================
+ Coverage     84.42%   84.55%   +0.13%     
- Complexity    29990    30064      +74     
============================================
  Files          2005     2007       +2     
  Lines         86850    87047     +197     
============================================
+ Hits          73320    73600     +280     
+ Misses        13530    13447      -83     
Components Coverage Δ
etl 91.48% <100.00%> (+<0.01%) ⬆️
cli 75.45% <ø> (ø)
lib-array-dot 96.52% <ø> (ø)
lib-azure-sdk 64.44% <ø> (ø)
lib-doctrine-dbal-bulk 70.36% <ø> (ø)
lib-filesystem 77.08% <ø> (ø)
lib-types 90.49% <ø> (ø)
lib-parquet 70.32% <ø> (+0.09%) ⬆️
lib-parquet-viewer 82.26% <ø> (ø)
lib-snappy 89.86% <ø> (ø)
lib-dremel 0.00% <ø> (ø)
lib-postgresql 85.64% <100.00%> (+0.39%) ⬆️
lib-telemetry 86.62% <ø> (ø)
bridge-filesystem-async-aws 86.31% <ø> (ø)
bridge-filesystem-azure 80.96% <ø> (ø)
bridge-filesystem-sftp 91.02% <ø> (ø)
bridge-monolog-http 91.54% <ø> (ø)
bridge-monolog-telemetry 94.79% <ø> (ø)
bridge-openapi-specification 60.86% <ø> (ø)
symfony-http-foundation 56.86% <ø> (ø)
bridge-psr18-telemetry 100.00% <ø> (ø)
bridge-psr3-telemetry 98.95% <ø> (ø)
bridge-psr7-telemetry 100.00% <ø> (ø)
bridge-telemetry-otlp 90.11% <ø> (ø)
bridge-symfony-http-foundation-telemetry 92.85% <ø> (ø)
bridge-symfony-filesystem-bundle 91.85% <ø> (ø)
bridge-symfony-filesystem-cache 98.18% <ø> (ø)
bridge-symfony-postgresql-bundle 93.04% <ø> (ø)
bridge-symfony-postgresql-cache 94.41% <ø> (ø)
bridge-symfony-postgresql-messenger 98.80% <ø> (ø)
bridge-symfony-postgresql-session 93.65% <ø> (ø)
bridge-symfony-telemetry-bundle 90.72% <ø> (ø)
adapter-chartjs 80.50% <ø> (ø)
adapter-csv 95.97% <ø> (ø)
adapter-doctrine 93.02% <94.68%> (-0.61%) ⬇️
adapter-google-sheet 80.11% <ø> (ø)
adapter-http 76.52% <ø> (ø)
adapter-json 65.62% <ø> (ø)
adapter-logger 28.57% <ø> (ø)
adapter-parquet 75.30% <ø> (ø)
adapter-text 70.78% <ø> (ø)
adapter-xml 59.83% <ø> (ø)
adapter-avro 0.00% <ø> (ø)
adapter-excel 79.10% <ø> (ø)
adapter-postgresql 79.96% <100.00%> (+1.92%) ⬆️
adapter-seal 65.69% <ø> (ø)
bridge-phpunit-postgresql 75.30% <ø> (ø)
bridge-phpunit-telemetry 87.36% <ø> (ø)
bridge-phpstan-types 0.00% <ø> (ø)
bridge-postgresql-valinor 100.00% <ø> (ø)
🚀 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 623b184 into 1.x Sep 15, 2026
49 of 50 checks passed
@norberttech
norberttech deleted the schema-probe-errors branch September 15, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant