From 5a158b953797ec673d005d506b8e16a91a150a7a Mon Sep 17 00:00:00 2001 From: lukinovec Date: Thu, 20 Apr 2023 17:05:18 +0200 Subject: [PATCH] Delete legacy bootstrapper from the bootstrappers config, add info to the bootstrapper's docblock --- assets/config.php | 1 - src/Bootstrappers/CacheTagsBootstrapper.php | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/config.php b/assets/config.php index 92782858..3875aca1 100644 --- a/assets/config.php +++ b/assets/config.php @@ -103,7 +103,6 @@ return [ Stancl\Tenancy\Bootstrappers\QueueTenancyBootstrapper::class, Stancl\Tenancy\Bootstrappers\BatchTenancyBootstrapper::class, // Stancl\Tenancy\Bootstrappers\PrefixCacheTenancyBootstrapper::class, - // Stancl\Tenancy\Bootstrappers\CacheTagsBootstrapper::class, // Note: DI won't work properly. PrefixCacheTenancyBootstrapper is the recommended way of separating cache // Stancl\Tenancy\Bootstrappers\UrlTenancyBootstrapper::class, // Stancl\Tenancy\Bootstrappers\SessionTenancyBootstrapper::class, // Stancl\Tenancy\Bootstrappers\MailTenancyBootstrapper::class, // Queueing mail requires using QueueTenancyBootstrapper with $forceRefresh set to true diff --git a/src/Bootstrappers/CacheTagsBootstrapper.php b/src/Bootstrappers/CacheTagsBootstrapper.php index 2a2efa32..7ab28c96 100644 --- a/src/Bootstrappers/CacheTagsBootstrapper.php +++ b/src/Bootstrappers/CacheTagsBootstrapper.php @@ -14,6 +14,8 @@ use Stancl\Tenancy\Contracts\Tenant; * todo name. * * Separate tenant cache using tagging. + * This is the legacy approach. Some things, like dependency injection, won't work properly with this bootstrapper. + * PrefixCacheTenancyBootstrapper is the recommended bootstrapper for cache separation. */ class CacheTagsBootstrapper implements TenancyBootstrapper {