Skip to content

fix(flow-php/postgresql): traverse every AST node through protobuf descriptors - #2648

Merged
norberttech merged 1 commit into
1.xfrom
pgsql-query-traversing-bug
Sep 22, 2026
Merged

norberttech merged 1 commit into
1.xfrom
pgsql-query-traversing-bug

Conversation

@norberttech

Copy link
Copy Markdown
Member

Resolves: #xxx

Change Log


Added

  • flow-php/postgresql - collate() expression and COLLATE support in the query builder
  • flow-php/postgresql - NodeModifier::REMOVE_NODE removes nodes from lists
  • flow-php/postgresql - Index::toSql() and Trigger::toSql()

Fixed

  • flow-php/postgresql - AST traversal visits every node and applies nested replacements
  • flow-php/postgresql - keyset pagination over UNION/INTERSECT/EXCEPT keeps the cursor condition
  • flow-php/postgresql - explain() never executes writes, ANALYZE is always rolled back
  • flow-php/postgresql - schema DDL emits declared expressions, index predicates and trigger WHEN conditions
  • flow-php/postgresql - schema-qualified trigger functions no longer drift against the catalog
  • flow-php/postgresql - a failed SAVEPOINT keeps the outer transaction usable

Changed

  • flow-php/postgresql - ModificationContext ancestors are messages and depth counts every message edge
  • flow-php/postgresql - extractors report nodes from every clause, in PostgreSQL walker order
  • flow-php/postgresql - ExplainModifier handles ParseResult and rejects non-explainable statements
  • flow-php/postgresql - schema objects keep the declared text and compare through normalised keys

Removed

  • flow-php/postgresql - NodeVisitor::REMOVE_NODE
  • flow-php/postgresql - ExpressionParser::normalizeNode()

Deprecated

Security

…scriptors

- Traverser walks all message fields, writes replacements at any depth, supports NodeModifier::REMOVE_NODE
- keyset pagination wraps UNION/INTERSECT/EXCEPT; new collate() expression
- explain() wraps every explainable statement and rolls back ANALYZE; failed SAVEPOINT keeps the outer transaction
- schema DDL emits the declared expressions, index WHERE and trigger WHEN; trigger functions resolve to the table's schema
- Index::toSql() and Trigger::toSql() replace the duplicated emitters; ExpressionParser::normalizeNode() removed
@norberttech norberttech added this to the 0.45.0 milestone Sep 22, 2026
@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.08537% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.92%. Comparing base (54830ab) to head (f5f7d79).
⚠️ 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    #2648      +/-   ##
============================================
+ Coverage     84.87%   84.92%   +0.04%     
+ Complexity    31275    31218      -57     
============================================
  Files          2123     2124       +1     
  Lines         89617    89374     -243     
============================================
- Hits          76064    75900     -164     
+ Misses        13553    13474      -79     
Components Coverage Δ
etl 92.31% <ø> (-0.01%) ⬇️
cli 76.03% <ø> (ø)
lib-array-dot 96.52% <ø> (ø)
lib-azure-sdk 64.44% <ø> (ø)
lib-doctrine-dbal-bulk 70.36% <ø> (ø)
lib-filesystem 77.18% <ø> (ø)
lib-types 90.49% <ø> (ø)
lib-parquet 70.32% <ø> (ø)
lib-parquet-viewer 82.26% <ø> (ø)
lib-snappy 89.86% <ø> (ø)
lib-dremel 0.00% <ø> (ø)
lib-postgresql 85.84% <99.08%> (+0.20%) ⬆️
lib-telemetry 86.59% <ø> (ø)
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 88.55% <ø> (ø)
adapter-doctrine 90.06% <ø> (ø)
adapter-google-sheet 81.17% <ø> (ø)
adapter-http 75.75% <ø> (ø)
adapter-json 67.77% <ø> (ø)
adapter-logger 28.57% <ø> (ø)
adapter-parquet 76.58% <ø> (ø)
adapter-text 72.06% <ø> (ø)
adapter-xml 60.32% <ø> (ø)
adapter-avro 7.14% <ø> (ø)
adapter-excel 80.00% <ø> (ø)
adapter-postgresql 78.56% <ø> (ø)
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 676d2e5 into 1.x Sep 22, 2026
50 checks passed
@norberttech
norberttech deleted the pgsql-query-traversing-bug branch September 22, 2026 13:22
@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant