-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[11.x] Support eager loading with limit #49695
[11.x] Support eager loading with limit #49695
Conversation
The failing tests aren't related to this PR. |
@staudenmeir Massive work 💪 Hope your other packages will have Laravel team attention. |
*/ | ||
public function useLegacyGroupLimit(Builder $query) | ||
{ | ||
$version = $query->getConnection()->getReadPdo()->getAttribute(PDO::ATTR_SERVER_VERSION); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$version = $query->getConnection()->getReadPdo()->getAttribute(PDO::ATTR_SERVER_VERSION); | |
$version = $query->getConnection()->getServerVersion(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you maybe send in a follow up PR with your suggestions? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: #49723
*/ | ||
protected function compileGroupLimit(Builder $query) | ||
{ | ||
$version = $query->getConnection()->getReadPdo()->getAttribute(PDO::ATTR_SERVER_VERSION); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$version = $query->getConnection()->getReadPdo()->getAttribute(PDO::ATTR_SERVER_VERSION); | |
$version = $query->getConnection()->getServerVersion(); |
Thanks @staudenmeir! 🥳 |
Great work!!! |
Thank a lot <3 |
can't wait for your other eloquent extension packages to be included in the core. |
Thank you. |
Thanks a lot <3 |
As discussed: A new version of #26035 that integrates the eloquent-eager-limit package.
Support for MySQL 5.7
According to the current docs, Laravel 11 won't support MySQL 5.7 anymore. I still included the legacy workaround for MySQL 5.7 since the necessary code already exists and MySQL 5.7 is still being tested. The MySQL support in Laravel 11 is also still being discussed.