You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->withoutEvents() calls should be replaced with Event::fake(), Event::fakeFor(), etc.
The MocksApplicationServices trait has been marked @deprecated since the laravel/framework 8.x. The 10.x upgrade guide does mention its removal but the note doesn't mention withoutEvents by name: https://laravel.com/docs/10.x/upgrade#service-mocking
Description:
After upgrading to Laravel 10, a test of mine that uses the
WithoutEvents
trait, started to fail due to a missingwithoutEvents
method.The now missing method seems to have been included in a deprecated trait in laravel 9:
framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php
Line 101 in 3bbc6c5
The upgrade guide also does not mention the
WithoutEvents
trait being superseded by another.Is this a dropped feature, or do I have to replace the trait with a method call?
The text was updated successfully, but these errors were encountered: