diff --git a/assets/config.php b/assets/config.php index ab5bf868..9ec3b5d2 100644 --- a/assets/config.php +++ b/assets/config.php @@ -36,11 +36,11 @@ return [ * To configure their behavior, see the config keys below. */ 'bootstrappers' => [ - 'database' => Stancl\Tenancy\TenancyBootstrappers\DatabaseTenancyBootstrapper::class, - 'cache' => Stancl\Tenancy\TenancyBootstrappers\CacheTenancyBootstrapper::class, - 'filesystem' => Stancl\Tenancy\TenancyBootstrappers\FilesystemTenancyBootstrapper::class, - 'queue' => Stancl\Tenancy\TenancyBootstrappers\QueueTenancyBootstrapper::class, - // 'redis' => Stancl\Tenancy\TenancyBootstrappers\RedisTenancyBootstrapper::class, // Note: phpredis is needed + 'database' => Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper::class, + 'cache' => Stancl\Tenancy\Bootstrappers\CacheTenancyBootstrapper::class, + 'filesystem' => Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper::class, + 'queue' => Stancl\Tenancy\Bootstrappers\QueueTenancyBootstrapper::class, + // 'redis' => Stancl\Tenancy\Bootstrappers\RedisTenancyBootstrapper::class, // Note: phpredis is needed ], /** diff --git a/src/TenancyBootstrappers/CacheTenancyBootstrapper.php b/src/Bootstrappers/CacheTenancyBootstrapper.php similarity index 96% rename from src/TenancyBootstrappers/CacheTenancyBootstrapper.php rename to src/Bootstrappers/CacheTenancyBootstrapper.php index 04da2811..bef156d2 100644 --- a/src/TenancyBootstrappers/CacheTenancyBootstrapper.php +++ b/src/Bootstrappers/CacheTenancyBootstrapper.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Stancl\Tenancy\TenancyBootstrappers; +namespace Stancl\Tenancy\Bootstrappers; use Illuminate\Cache\CacheManager; use Illuminate\Contracts\Foundation\Application; diff --git a/src/TenancyBootstrappers/DatabaseTenancyBootstrapper.php b/src/Bootstrappers/DatabaseTenancyBootstrapper.php similarity index 95% rename from src/TenancyBootstrappers/DatabaseTenancyBootstrapper.php rename to src/Bootstrappers/DatabaseTenancyBootstrapper.php index 9836ec36..c9d9d791 100644 --- a/src/TenancyBootstrappers/DatabaseTenancyBootstrapper.php +++ b/src/Bootstrappers/DatabaseTenancyBootstrapper.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Stancl\Tenancy\TenancyBootstrappers; +namespace Stancl\Tenancy\Bootstrappers; use Stancl\Tenancy\Contracts\TenancyBootstrapper; use Stancl\Tenancy\DatabaseManager; diff --git a/src/TenancyBootstrappers/FilesystemTenancyBootstrapper.php b/src/Bootstrappers/FilesystemTenancyBootstrapper.php similarity index 98% rename from src/TenancyBootstrappers/FilesystemTenancyBootstrapper.php rename to src/Bootstrappers/FilesystemTenancyBootstrapper.php index 101c9b7c..58dda98c 100644 --- a/src/TenancyBootstrappers/FilesystemTenancyBootstrapper.php +++ b/src/Bootstrappers/FilesystemTenancyBootstrapper.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Stancl\Tenancy\TenancyBootstrappers; +namespace Stancl\Tenancy\Bootstrappers; use Illuminate\Filesystem\FilesystemAdapter; use Illuminate\Foundation\Application; diff --git a/src/TenancyBootstrappers/QueueTenancyBootstrapper.php b/src/Bootstrappers/QueueTenancyBootstrapper.php similarity index 98% rename from src/TenancyBootstrappers/QueueTenancyBootstrapper.php rename to src/Bootstrappers/QueueTenancyBootstrapper.php index dc35e0cf..a9d13c23 100644 --- a/src/TenancyBootstrappers/QueueTenancyBootstrapper.php +++ b/src/Bootstrappers/QueueTenancyBootstrapper.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Stancl\Tenancy\TenancyBootstrappers; +namespace Stancl\Tenancy\Bootstrappers; use Illuminate\Config\Repository; use Illuminate\Contracts\Events\Dispatcher; diff --git a/src/TenancyBootstrappers/RedisTenancyBootstrapper.php b/src/Bootstrappers/RedisTenancyBootstrapper.php similarity index 96% rename from src/TenancyBootstrappers/RedisTenancyBootstrapper.php rename to src/Bootstrappers/RedisTenancyBootstrapper.php index 6e155efa..7536984e 100644 --- a/src/TenancyBootstrappers/RedisTenancyBootstrapper.php +++ b/src/Bootstrappers/RedisTenancyBootstrapper.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Stancl\Tenancy\TenancyBootstrappers; +namespace Stancl\Tenancy\Bootstrappers; use Illuminate\Contracts\Config\Repository; use Illuminate\Support\Facades\Redis; diff --git a/src/TenancyServiceProvider.php b/src/TenancyServiceProvider.php index 848ea665..20741d47 100644 --- a/src/TenancyServiceProvider.php +++ b/src/TenancyServiceProvider.php @@ -6,7 +6,7 @@ namespace Stancl\Tenancy; use Illuminate\Cache\CacheManager; use Illuminate\Support\ServiceProvider; -use Stancl\Tenancy\TenancyBootstrappers\FilesystemTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper; use Stancl\Tenancy\Contracts\Tenant; class TenancyServiceProvider extends ServiceProvider diff --git a/tests/BootstrapperTest.php b/tests/BootstrapperTest.php index f90182cb..3e1f3799 100644 --- a/tests/BootstrapperTest.php +++ b/tests/BootstrapperTest.php @@ -15,10 +15,10 @@ use Stancl\Tenancy\Events\TenancyEnded; use Stancl\Tenancy\Events\TenancyInitialized; use Stancl\Tenancy\Events\TenantCreated; use Stancl\Tenancy\Jobs\CreateDatabase; -use Stancl\Tenancy\TenancyBootstrappers\CacheTenancyBootstrapper; -use Stancl\Tenancy\TenancyBootstrappers\DatabaseTenancyBootstrapper; -use Stancl\Tenancy\TenancyBootstrappers\FilesystemTenancyBootstrapper; -use Stancl\Tenancy\TenancyBootstrappers\RedisTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\CacheTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\RedisTenancyBootstrapper; use Stancl\Tenancy\Tests\TestCase; class BootstrapperTest extends TestCase diff --git a/tests/CacheManagerTest.php b/tests/CacheManagerTest.php index 7f303d68..97b53c9e 100644 --- a/tests/CacheManagerTest.php +++ b/tests/CacheManagerTest.php @@ -8,7 +8,7 @@ use Illuminate\Support\Facades\Event; use Stancl\Tenancy\Tests\Etc\Tenant; use Stancl\Tenancy\Listeners\BootstrapTenancy; use Stancl\Tenancy\Events\TenancyInitialized; -use Stancl\Tenancy\TenancyBootstrappers\CacheTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\CacheTenancyBootstrapper; use Stancl\Tenancy\Tests\TestCase; class CacheManagerTest extends TestCase diff --git a/tests/CommandsTest.php b/tests/CommandsTest.php index 26539169..0e7d69e6 100644 --- a/tests/CommandsTest.php +++ b/tests/CommandsTest.php @@ -17,7 +17,7 @@ use Stancl\Tenancy\Events\TenancyEnded; use Stancl\Tenancy\Events\TenancyInitialized; use Stancl\Tenancy\Events\TenantCreated; use Stancl\Tenancy\Jobs\CreateDatabase; -use Stancl\Tenancy\TenancyBootstrappers\DatabaseTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper; use Stancl\Tenancy\Tests\TestCase; class CommandsTest extends TestCase diff --git a/tests/DatabaseUsersTest.php b/tests/DatabaseUsersTest.php index 0d0f69f3..41eec1d0 100644 --- a/tests/DatabaseUsersTest.php +++ b/tests/DatabaseUsersTest.php @@ -17,7 +17,7 @@ use Stancl\Tenancy\Listeners\JobPipeline; use Stancl\Tenancy\Events\TenantCreated; use Stancl\Tenancy\Jobs\CreateDatabase; use Stancl\Tenancy\Listeners\BootstrapTenancy; -use Stancl\Tenancy\TenancyBootstrappers\DatabaseTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper; use Stancl\Tenancy\Tests\TestCase; class DatabaseUsersTest extends TestCase diff --git a/tests/GlobalCacheTest.php b/tests/GlobalCacheTest.php index e8242752..edf92711 100644 --- a/tests/GlobalCacheTest.php +++ b/tests/GlobalCacheTest.php @@ -9,7 +9,7 @@ use Stancl\Tenancy\Facades\GlobalCache; use Stancl\Tenancy\Tests\Etc\Tenant; use Stancl\Tenancy\Listeners\BootstrapTenancy; use Stancl\Tenancy\Events\TenancyInitialized; -use Stancl\Tenancy\TenancyBootstrappers\CacheTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\CacheTenancyBootstrapper; use Stancl\Tenancy\Tests\TestCase; class GlobalCacheTest extends TestCase diff --git a/tests/QueueTest.php b/tests/QueueTest.php index 4c4eba2f..1631ab7c 100644 --- a/tests/QueueTest.php +++ b/tests/QueueTest.php @@ -13,7 +13,7 @@ use Spatie\Valuestore\Valuestore; use Stancl\Tenancy\Tests\Etc\Tenant; use Stancl\Tenancy\Listeners\BootstrapTenancy; use Stancl\Tenancy\Events\TenancyInitialized; -use Stancl\Tenancy\TenancyBootstrappers\QueueTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\QueueTenancyBootstrapper; use Stancl\Tenancy\Tests\TestCase; class QueueTest extends TestCase diff --git a/tests/ResourceSyncingTest.php b/tests/ResourceSyncingTest.php index 3ab5b6d9..15f7e3e7 100644 --- a/tests/ResourceSyncingTest.php +++ b/tests/ResourceSyncingTest.php @@ -24,7 +24,7 @@ use Stancl\Tenancy\Events\TenancyInitialized; use Stancl\Tenancy\Events\TenantCreated; use Stancl\Tenancy\Exceptions\ModelNotSyncMaster; use Stancl\Tenancy\Jobs\CreateDatabase; -use Stancl\Tenancy\TenancyBootstrappers\DatabaseTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper; use Stancl\Tenancy\Tests\Etc\Tenant; use Stancl\Tenancy\Tests\TestCase; use Illuminate\Support\Str; diff --git a/tests/TenantAssetTest.php b/tests/TenantAssetTest.php index 4a89f582..3bda0f3b 100644 --- a/tests/TenantAssetTest.php +++ b/tests/TenantAssetTest.php @@ -13,7 +13,7 @@ use Stancl\Tenancy\Listeners\BootstrapTenancy; use Stancl\Tenancy\Events\TenancyInitialized; use Stancl\Tenancy\Middleware\InitializeTenancyByDomain; use Stancl\Tenancy\Middleware\InitializeTenancyByRequestData; -use Stancl\Tenancy\TenancyBootstrappers\FilesystemTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper; use Stancl\Tenancy\Tests\TestCase; class TenantAssetTest extends TestCase diff --git a/tests/TenantDatabaseManagerTest.php b/tests/TenantDatabaseManagerTest.php index ce1c6e59..6fe22d07 100644 --- a/tests/TenantDatabaseManagerTest.php +++ b/tests/TenantDatabaseManagerTest.php @@ -13,7 +13,7 @@ use Stancl\Tenancy\Events\TenancyInitialized; use Stancl\Tenancy\Events\TenantCreated; use Stancl\Tenancy\Exceptions\TenantDatabaseAlreadyExistsException; use Stancl\Tenancy\Jobs\CreateDatabase; -use Stancl\Tenancy\TenancyBootstrappers\DatabaseTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper; use Stancl\Tenancy\TenantDatabaseManagers\MySQLDatabaseManager; use Stancl\Tenancy\TenantDatabaseManagers\PermissionControlledMySQLDatabaseManager; use Stancl\Tenancy\TenantDatabaseManagers\PostgreSQLDatabaseManager; diff --git a/tests/TenantModelTest.php b/tests/TenantModelTest.php index 2eea16f4..85674890 100644 --- a/tests/TenantModelTest.php +++ b/tests/TenantModelTest.php @@ -17,7 +17,7 @@ use Stancl\Tenancy\Events\TenancyInitialized; use Stancl\Tenancy\Jobs\CreateDatabase; use Stancl\Tenancy\Listeners\BootstrapTenancy; use Stancl\Tenancy\Listeners\JobPipeline; -use Stancl\Tenancy\TenancyBootstrappers\DatabaseTenancyBootstrapper; +use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper; use Illuminate\Support\Str; class TenantModelTest extends TestCase diff --git a/tests/TestCase.php b/tests/TestCase.php index 9035e0f3..f1c04004 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -77,7 +77,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase '--force' => true, ], 'tenancy.storage.connection' => 'central', - 'tenancy.bootstrappers.redis' => \Stancl\Tenancy\TenancyBootstrappers\RedisTenancyBootstrapper::class, + 'tenancy.bootstrappers.redis' => \Stancl\Tenancy\Bootstrappers\RedisTenancyBootstrapper::class, 'queue.connections.central' => [ 'driver' => 'sync', 'central' => true, @@ -86,7 +86,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase 'tenancy.tenant_model' => Tenant::class, // Use test tenant w/ DBs & domains ]); - $app->singleton(\Stancl\Tenancy\TenancyBootstrappers\RedisTenancyBootstrapper::class); + $app->singleton(\Stancl\Tenancy\Bootstrappers\RedisTenancyBootstrapper::class); } protected function getPackageProviders($app)