Skip to content

Describe what LazilyRefreshDatabase actually defers - #944

Merged
pushpak1300 merged 1 commit into
laravel:mainfrom
sulimanbenhalim:fix/lazily-refresh-database-description
Aug 18, 2026
Merged

Describe what LazilyRefreshDatabase actually defers#944
pushpak1300 merged 1 commit into
laravel:mainfrom
sulimanbenhalim:fix/lazily-refresh-database-description

Conversation

@sulimanbenhalim

Copy link
Copy Markdown
Contributor

testing.md says LazilyRefreshDatabase "skips even that first migration if the schema is already up to date". It defers on database access, not schema state.

The trait hangs baseRefreshDatabase() off beforeExecuting and beforeStartingTransaction, so it fires on first use. Two tests in one class, the first one never querying:

[1] test that never queries -> migrated=false
[2] test that runs a query   -> migrated=true

Nothing in there checks whether the schema is current. Reworded to match.

@pushpak1300
pushpak1300 merged commit 57e09f4 into laravel:main Aug 18, 2026
23 of 24 checks passed
@sulimanbenhalim
sulimanbenhalim deleted the fix/lazily-refresh-database-description branch August 18, 2026 00:34
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