-
-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand docblock of JoinSub to allow other models #1352
Expand docblock of JoinSub to allow other models #1352
Conversation
The previous version of this docblock used the template `TModelClass`. However, this template was already in use at the class level, effectively limiting the argument to `joinSub` to be a QueryBuilder of the same type. The test proved that this was allowed: ``` User::query()->joinSub( User::query()->whereIn('id', [1, 2, 3]), 'users', 'users.id', 'users.id' ); ``` However, in the wild, I noticed that `User::query()->joinSub(Post::query(), ...)` was _not_ allowed. This change fixes that, simply by renaming the template in the `joinSub` docblock.
Hi! |
Oh! So you want to free |
I'd merge it after having a quick line in the changelog. |
Sure thing! Do you want me to add a new section in the Changelog for |
In the |
Done! |
I like your dashes. |
Thank you! |
Oops. 😅 Glad you like them, that was Prettier auto-formatting the file. |
Expands on #1212.
Changes
The previous version of this docblock used the template
TModelClass
.However, this template was already in use at the class level, effectively limiting the argument to
joinSub
to be a QueryBuilder of the same type.The test proved that this was allowed:
However, in the wild, I noticed that
User::query()->joinSub(Post::query(), ...)
was not allowed.This change fixes that, simply by renaming the template in the
joinSub
docblock.Breaking changes
None.