Skip to content

[12.x] Restore lazy loading check#55817

Merged
taylorotwell merged 1 commit into
laravel:12.xfrom
decadence:patch-1
May 22, 2025
Merged

[12.x] Restore lazy loading check#55817
taylorotwell merged 1 commit into
laravel:12.xfrom
decadence:patch-1

Conversation

@decadence

@decadence decadence commented May 22, 2025

Copy link
Copy Markdown
Contributor

This reverts #55771

I (and some other people) don't see much point in that change. If automaticallyEagerLoadingRelationships is working correctly then the code will not reach this point. If it's wrong in some situations (packages or some complex cases) then we should see the exception but after that change we won't.

automaticallyEagerLoadingRelationships works with preventLazyLoading nicely so why do we need disable this check?

@taylorotwell taylorotwell merged commit f5bd2c5 into laravel:12.x May 22, 2025
31 of 61 checks passed
@devajmeireles

Copy link
Copy Markdown
Contributor

@decadence , You are absolutely right! I had an N+1 issue with a package I'm using, and I thought it was something like a Laravel false-positive warning. @taylorotwell , I'm so sorry about that!

@decadence decadence deleted the patch-1 branch May 22, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants