From f1ec46856cbdbdde757b257b0a4768090ce6f43e Mon Sep 17 00:00:00 2001 From: Hrvoje Date: Sat, 21 Sep 2019 13:13:43 +0200 Subject: [PATCH 1/2] Improved flushing of container --- src/Illuminate/Container/Container.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Illuminate/Container/Container.php b/src/Illuminate/Container/Container.php index 343ebaf7e65b..5139981c5d72 100755 --- a/src/Illuminate/Container/Container.php +++ b/src/Illuminate/Container/Container.php @@ -1197,6 +1197,17 @@ public function flush() $this->bindings = []; $this->instances = []; $this->abstractAliases = []; + $this->methodBindings = []; + $this->buildStack = []; + $this->extenders = []; + $this->tags = []; + $this->with = []; + $this->contextual = []; + $this->reboundCallbacks = []; + $this->globalResolvingCallbacks = []; + $this->globalAfterResolvingCallbacks = []; + $this->resolvingCallbacks = []; + $this->afterResolvingCallbacks = []; } /** From b6aafdc012400b9a9dc9b0bcb575c88b34799620 Mon Sep 17 00:00:00 2001 From: Hrvoje Date: Sat, 21 Sep 2019 13:18:30 +0200 Subject: [PATCH 2/2] Cleaned up Application flushing --- src/Illuminate/Foundation/Application.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 530ac977247d..47d1934e7531 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -1201,16 +1201,12 @@ public function flush() { parent::flush(); - $this->buildStack = []; $this->loadedProviders = []; $this->bootedCallbacks = []; $this->bootingCallbacks = []; + $this->terminatingCallbacks = []; $this->deferredServices = []; - $this->reboundCallbacks = []; $this->serviceProviders = []; - $this->resolvingCallbacks = []; - $this->afterResolvingCallbacks = []; - $this->globalResolvingCallbacks = []; } /**