[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.
| $version = $query->getConnection()->getReadPdo()->getAttribute(PDO::ATTR_SERVER_VERSION); | |
| $version = $query->getConnection()->getServerVersion(); |
There was a problem hiding this comment.
Could you maybe send in a follow up PR with your suggestions? Thanks!
| */ | ||
| protected function compileGroupLimit(Builder $query) | ||
| { | ||
| $version = $query->getConnection()->getReadPdo()->getAttribute(PDO::ATTR_SERVER_VERSION); |
There was a problem hiding this comment.
| $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 |
|
I am updating an old Laravel project (originally 8) and this is an undocumented breaking change for Laravel 10 to 11. The project had a query which was ordering by pivot columns which are no longer pivot_* (need to now just do table.column) so i guess this is just a psa |
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.