Repository navigation
Add Identifier expression + Add IdentifierQuoterInterface and implement it in Quoter - #1204
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This was referenced Oct 13, 2026
Contributor
There was a problem hiding this comment.
🟡 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
IdentifierQuoterInterfaceandQuoter. - 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.
Tigrov
reviewed
Oct 13, 2026
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>
Tigrov
reviewed
Oct 13, 2026
KalimeroMK
approved these changes
Oct 13, 2026
Tigrov
approved these changes
Oct 14, 2026
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Related PRs: