From 5285c3d9d5593d0e9e0b10a12e5d6338c26b46b0 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 31 Mar 2022 09:59:07 +0200 Subject: [PATCH 1/2] Update FlushTemporaryContainerInstances.php --- src/Listeners/FlushTemporaryContainerInstances.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Listeners/FlushTemporaryContainerInstances.php b/src/Listeners/FlushTemporaryContainerInstances.php index 003e0c22e..f8aa7cd0a 100644 --- a/src/Listeners/FlushTemporaryContainerInstances.php +++ b/src/Listeners/FlushTemporaryContainerInstances.php @@ -15,6 +15,10 @@ public function handle($event): void if (method_exists($event->app, 'resetScope')) { $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); From 3fbaaddb867012102daf20f2e68e1f886cfcd21d Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Thu, 31 Mar 2022 07:59:20 +0000 Subject: [PATCH 2/2] Apply fixes from StyleCI --- src/Listeners/FlushTemporaryContainerInstances.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Listeners/FlushTemporaryContainerInstances.php b/src/Listeners/FlushTemporaryContainerInstances.php index f8aa7cd0a..11421bd8d 100644 --- a/src/Listeners/FlushTemporaryContainerInstances.php +++ b/src/Listeners/FlushTemporaryContainerInstances.php @@ -15,7 +15,7 @@ public function handle($event): void if (method_exists($event->app, 'resetScope')) { $event->app->resetScope(); } - + if (method_exists($event->app, 'forgetScopedInstances')) { $event->app->forgetScopedInstances(); }