Skip to content

[8.x] Uses LazilyRefreshDatabase by default #5696

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
Sep 29, 2021

Conversation

nunomaduro
Copy link
Member

This pull request makes LazilyRefreshDatabase a default trait on the base test class for every new Laravel project. This way people don't need to worry about which test cases use the database or not - things will just work.

If this pull request gets merged, we may need to adapt the documentation before next week's release.

@taylorotwell taylorotwell merged commit 4578193 into 8.x Sep 29, 2021
@taylorotwell taylorotwell deleted the feat/lazily-refresh-database-by-default branch September 29, 2021 13:20
taylorotwell added a commit that referenced this pull request Oct 5, 2021
taylorotwell added a commit that referenced this pull request Oct 5, 2021
@taylorotwell
Copy link
Member

I reverted this because it doesn't have a good story for usage with Dusk and also doesn't work with the documented $seed property.

The Dusk case is particularly annoying since this trait is used on the base test class there is no way to opt-out of it for your Dusk tests which need to use DatabaseMigrations instead of RefreshDatabase behavior.

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