#3453 Change aliasIdForQuery visibility to public#3476
Open
dercoder wants to merge 8 commits intomongodb:5.xfrom
Open
#3453 Change aliasIdForQuery visibility to public#3476dercoder wants to merge 8 commits intomongodb:5.xfrom
dercoder wants to merge 8 commits intomongodb:5.xfrom
Conversation
GromNaN
requested changes
Feb 11, 2026
Member
GromNaN
left a comment
There was a problem hiding this comment.
I don't think this is the appropriate extension point for this.
But if we decide to add the methods aliasIdForQuery and aliasIdForResult to the public API, we have to find better names for them.
An idea might be to move this logic to the Grammar class?
added 2 commits
February 11, 2026 17:12
…thods Tests cover prepareFieldsForQuery and prepareFieldsForResult methods including id/_id aliasing, arrow/dot notation conversion, DateTime handling, nested structures, and renameEmbeddedIdField configuration. Also reorders PHPDoc annotations to follow consistent format.
GromNaN
reviewed
Feb 11, 2026
Co-authored-by: Jérôme Tamarelle <jerome@tamarelle.net>
Remove strict type hint from `$collection` property and update PHPDoc to use FQCN. Remove trailing whitespace.
Author
|
In Laravel 11, the connection is optional in the Grammar class. Any suggestions here? |
…ling Handle Grammar constructor changes in Laravel 12 where connection is passed via constructor instead of setConnection() method. Add backward compatibility for Laravel 11 by checking if setConnection() method exists before calling it.
Author
Laravel 12 passes the connection to Grammar via the constructor, but in Laravel 11 the constructor doesn't accept it Added method_exists guards to support both versions. |
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.
"Changed the visibility of aliasIdForQuery from private to public.
This allows developers to override the method or call it directly to normalize query data (e.g. id => _id) beforehand, resolving limitations like #3453
Checklist