diff --git a/src/Listeners/FlushTemporaryContainerInstances.php b/src/Listeners/FlushTemporaryContainerInstances.php index 003e0c22e..11421bd8d 100644 --- a/src/Listeners/FlushTemporaryContainerInstances.php +++ b/src/Listeners/FlushTemporaryContainerInstances.php @@ -16,6 +16,10 @@ public function handle($event): void $event->app->resetScope(); } + if (method_exists($event->app, 'forgetScopedInstances')) { + $event->app->forgetScopedInstances(); + } + foreach ($event->sandbox->make('config')->get('octane.flush', []) as $binding) { $event->app->forgetInstance($binding); }