From 753ff517c425cdee3a454cb41f69f83526c458ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Fri, 27 Sep 2019 21:24:40 +0200 Subject: [PATCH] Post-end() state reset --- src/TenancyBootstrappers/CacheTenancyBootstrapper.php | 2 ++ src/TenancyBootstrappers/FilesystemTenancyBootstrapper.php | 2 ++ src/TenancyBootstrappers/RedisTenancyBootstrapper.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/TenancyBootstrappers/CacheTenancyBootstrapper.php b/src/TenancyBootstrappers/CacheTenancyBootstrapper.php index dc4bb91e..ffd1ef6d 100644 --- a/src/TenancyBootstrappers/CacheTenancyBootstrapper.php +++ b/src/TenancyBootstrappers/CacheTenancyBootstrapper.php @@ -36,5 +36,7 @@ class CacheTenancyBootstrapper implements TenancyBootstrapper $this->app->extend('cache', function () { return $this->originalCache; }); + + $this->originalCache = null; } } diff --git a/src/TenancyBootstrappers/FilesystemTenancyBootstrapper.php b/src/TenancyBootstrappers/FilesystemTenancyBootstrapper.php index b08a79e2..9ab612b0 100644 --- a/src/TenancyBootstrappers/FilesystemTenancyBootstrapper.php +++ b/src/TenancyBootstrappers/FilesystemTenancyBootstrapper.php @@ -75,5 +75,7 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper foreach ($this->app['config']['tenancy.filesystem.disks'] as $disk) { Storage::disk($disk)->getAdapter()->setPathPrefix($this->originalPaths['disks'][$disk]); } + + $this->originalPaths = []; } } diff --git a/src/TenancyBootstrappers/RedisTenancyBootstrapper.php b/src/TenancyBootstrappers/RedisTenancyBootstrapper.php index 0ec834c2..ec137d70 100644 --- a/src/TenancyBootstrappers/RedisTenancyBootstrapper.php +++ b/src/TenancyBootstrappers/RedisTenancyBootstrapper.php @@ -40,6 +40,8 @@ class RedisTenancyBootstrapper implements TenancyBootstrapper $client->setOption($client::OPT_PREFIX, $this->originalPrefixes[$connection]); } + + $this->originalPrefixes = []; } protected function prefixedConnections()