From 8ccc27e8c3d5c2ad106dcbb77321a343862e456e Mon Sep 17 00:00:00 2001 From: lukinovec Date: Mon, 29 May 2023 11:15:38 +0200 Subject: [PATCH] Rename bootstrapper --- ...ootstrapper.php => PostgresSingleDatabaseBootstrapper.php} | 2 +- tests/PostgresTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/Bootstrappers/Integrations/{PostgresTenancyBootstrapper.php => PostgresSingleDatabaseBootstrapper.php} (96%) diff --git a/src/Bootstrappers/Integrations/PostgresTenancyBootstrapper.php b/src/Bootstrappers/Integrations/PostgresSingleDatabaseBootstrapper.php similarity index 96% rename from src/Bootstrappers/Integrations/PostgresTenancyBootstrapper.php rename to src/Bootstrappers/Integrations/PostgresSingleDatabaseBootstrapper.php index 94d25915..6422dd98 100644 --- a/src/Bootstrappers/Integrations/PostgresTenancyBootstrapper.php +++ b/src/Bootstrappers/Integrations/PostgresSingleDatabaseBootstrapper.php @@ -16,7 +16,7 @@ use Stancl\Tenancy\Database\Contracts\TenantWithDatabase; * * This bootstrapper is intended to be used with single-database tenancy. */ -class PostgresTenancyBootstrapper implements TenancyBootstrapper +class PostgresSingleDatabaseBootstrapper implements TenancyBootstrapper { protected array $originalCentralConnectionConfig; protected array $originalPostgresConfig; diff --git a/tests/PostgresTest.php b/tests/PostgresTest.php index 0a517e27..8ff819f3 100644 --- a/tests/PostgresTest.php +++ b/tests/PostgresTest.php @@ -17,12 +17,12 @@ use Stancl\Tenancy\Jobs\DeleteTenantsPostgresUser; use Illuminate\Database\Eloquent\Concerns\HasUuids; use Stancl\Tenancy\Jobs\CreatePostgresUserForTenant; use Stancl\Tenancy\Listeners\RevertToCentralContext; -use Stancl\Tenancy\Bootstrappers\Integrations\PostgresTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\Integrations\PostgresSingleDatabaseBootstrapper; beforeEach(function () { DB::purge('central'); - config(['tenancy.bootstrappers' => [PostgresTenancyBootstrapper::class]]); + config(['tenancy.bootstrappers' => [PostgresSingleDatabaseBootstrapper::class]]); Event::listen(TenancyInitialized::class, BootstrapTenancy::class); Event::listen(TenancyEnded::class, RevertToCentralContext::class);