Skip to content

Add Identifier expression + Add IdentifierQuoterInterface and implement it in Quoter - #1204

Merged
vjik merged 8 commits into
masterfrom
identifier
Oct 14, 2026
Merged

vjik merged 8 commits into
masterfrom
identifier

Conversation

@vjik

@vjik vjik commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

@codecov

codecov Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.73%. Comparing base (95c35d4) to head (f1467cf).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1204   +/-   ##
=========================================
  Coverage     98.72%   98.73%           
- Complexity     1653     1661    +8     
=========================================
  Files           123      125    +2     
  Lines          4309     4340   +31     
=========================================
+ Hits           4254     4285   +31     
  Misses           55       55           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vjik
vjik requested a review from a team October 13, 2026 10:01
@vjik vjik added the status:code review The pull request needs review. label Oct 13, 2026
@vjik
vjik requested a balanced review from Copilot October 13, 2026 10:03

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.

🟡 Changes recommended

The public quoter contract permits a zero-part call that silently returns invalid empty SQL.

1 open finding
What changed in this PR

Adds strictly quoted SQL identifiers as a safe alternative to heuristic column-name quoting.

Changes:

  • Adds Identifier, its builder, and query-builder registration.
  • Adds strict identifier quoting through IdentifierQuoterInterface and Quoter.
  • Adds documentation and cross-query tests.
File Description
CHANGELOG.md Records the new APIs.
docs/​guide/​en/​expressions/​expressions.md Lists Identifier.
docs/​guide/​en/​expressions/​values.md Documents strict identifier quoting.
src/​Expression/​Value/​Identifier.php Represents validated identifier parts.
src/​Expression/​Value/​Builder/​IdentifierBuilder.php Builds quoted identifiers.
src/​QueryBuilder/​AbstractDQLQueryBuilder.php Registers the builder.
src/​Schema/​IdentifierQuoterInterface.php Defines strict quoting.
src/​Schema/​Quoter.php Implements strict quoting.
tests/​Common/​CommonQueryBuilderTest.php Tests query construction.
tests/​Common/​CommonQueryTest.php Tests database execution.
tests/​Db/​Expression/​Value/​Builder/​IdentifierBuilderTest.php Tests builder behavior.
tests/​Db/​Expression/​Value/​IdentifierTest.php Tests identifier validation.
tests/​Db/​Schema/​QuoterTest.php Tests quoting and escaping.

🧠 Review effort: Balanced


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

Comment thread src/Schema/IdentifierQuoterInterface.php Outdated
@vjik
vjik requested a balanced review from Copilot October 13, 2026 10:13

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.

🟢 Approval recommended

The implementation is compatible, consistently integrated, and comprehensively tested across supported quoting styles.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

Comment thread tests/Common/CommonQueryBuilderTest.php Outdated
Comment thread src/Expression/Value/Identifier.php Outdated
Comment thread tests/Common/CommonQueryTest.php Outdated
Comment thread tests/Common/CommonQueryTest.php Outdated
Comment thread tests/Common/CommonQueryBuilderTest.php Outdated
vjik and others added 5 commits October 13, 2026 14:10
Co-authored-by: Sergei Tigrov <rrr-r@ya.ru>
Some DBMS, for example SQLite, support empty identifiers.
Co-authored-by: Sergei Tigrov <rrr-r@ya.ru>
Co-authored-by: Sergei Tigrov <rrr-r@ya.ru>
Co-authored-by: Sergei Tigrov <rrr-r@ya.ru>
@vjik
vjik requested a review from Tigrov October 13, 2026 11:28
Comment thread src/Schema/Quoter.php
@vjik
vjik merged commit 301c497 into master Oct 14, 2026
84 checks passed
@vjik
vjik deleted the identifier branch October 14, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants