-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Interacting with the database in the test teardown after calling the parent teardown is broken #49359
Comments
Sorry about that. We'll revert it: #49361 |
@rikvdh I think this is expected behavior:
While this was a significant change, your original code has a major problem. @driesvints @taylorotwell Why did you closed #49362? |
It is odd that model deletion works after
|
It might not be, by definition, my code, if you have 100's of testcases with 1000+ tests written by 10+ developers over the past 10 years things like this slip in. "My code" has 100's of 'major problems' every day, and fixing up 10 year old tests because behavioral changes in a bugfix release is no fun. |
@rikvdh It is hard to deal with code that is several years old, and I understand your difficulty. I do feel you are correct to the point where it was reverted once by this report, as it was certainly unexpected as a fix to 10.x. However, I felt it was odd that the resubmission for 11.x was reverted, so I raised a discussion. Thank you for your cooperation. |
Laravel Version
10.37.1
PHP Version
8.2.11
Database Driver & Version
MySQL
Description
When overriding teardown to cleanup something in your tests the behavior is now broken in v10.37.1 due to the changes with #49327 , the database connection is gone.
imo behavioural changes like this are never allowed in bugfix-releases.
Steps To Reproduce
The text was updated successfully, but these errors were encountered: