Skip to content

[12.x] Restore lazy loading check #55817

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

Merged
merged 1 commit into from
May 22, 2025
Merged

Conversation

decadence
Copy link
Contributor

@decadence decadence commented May 22, 2025

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
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