Skip to content

Improve handling of multi-value filters in SelectQuery - #3809

Open
matesko wants to merge 7 commits into
bolt:6.1from
matesko:patch-1
Open

matesko wants to merge 7 commits into
bolt:6.1from
matesko:patch-1

Conversation

@matesko

@matesko matesko commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

#3808

Refactor parameter replacement logic for multi-value filters in SelectQuery.

Refactor parameter replacement logic for multi-value filters in SelectQuery.
Hoist placeholder to keep the PHPStan ignore count at 1

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

馃煛 Changes recommended

Supported operators and overlapping placeholders can still produce invalid DQL or unused parameters.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Refactors SelectQuery parameter replacement for multi-value content-field filters.

Changes:

  • Rebuilds JSON field expressions for multiple bound values.
  • Preserves boolean filter structure.
  • Requires fixes for operator coverage and placeholder-boundary matching.
File Summary
src/鈥婼torage/鈥婼electQuery.php Updates multi-value field-expression and placeholder handling.

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/Storage/SelectQuery.php Outdated
Comment on lines +613 to +615
$result = str_replace(
$originalLeftExpression . ' = :' . $parameter,
str_replace($placeholder, ':' . $parameter, $newLeftExpression),

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

馃悰 tag: bug This is a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-value filters (|| / &&) on content fields bind more parameters than the generated DQL declares

3 participants