Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses failures when using dot-notation identifiers (e.g., schema.table, users.id) by improving identifier quoting and parameter placeholder generation in the CRUD helper, and adds connection-failure handling in the DB factory path.
Changes:
- Add dot-notation-aware identifier quoting (
quoteField) and encode field names into valid PDO parameter names (fieldToParam) for WHERE/UPDATE clauses. - Update CRUD factory creation to handle failed DB initialization.
- Change
Factory::init()/Factory::build()to returnfalseon connection errors instead of propagating\PDOException.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| src/Factory.php | Changes connection construction to return false on \PDOException and updates public return types accordingly. |
| src/CRUD.php | Fixes dot-notation support by quoting dotted identifiers per segment and generating valid parameter placeholders for dotted field names. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.