Skip to content
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] Fix regression in database assertions with custom model connections #52581

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

devfrey
Copy link
Contributor

@devfrey devfrey commented Aug 26, 2024

This PR fixes a regression that was introduced by #52464. Previously, assertModelExists() and assertModelMissing() would respect the model's table and connection (by passing the names to assertDatabaseHas() and assertDatabaseMissing() respectively). This is no longer the case, which caused test failures in my multi-connection project when upgrading to Laravel 11.21. This change ensures the table and connection that may have been changed at runtime are respected.

@taylorotwell taylorotwell merged commit b9cf7d3 into laravel:11.x Aug 27, 2024
31 checks passed
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.

2 participants