diff --git a/src/TenancyServiceProvider.php b/src/TenancyServiceProvider.php index e6465b00..e23200a6 100644 --- a/src/TenancyServiceProvider.php +++ b/src/TenancyServiceProvider.php @@ -84,16 +84,10 @@ class TenancyServiceProvider extends ServiceProvider Commands\Migrate::class, Commands\Rollback::class, Commands\TenantList::class, + Commands\TenantDump::class, Commands\MigrateFresh::class, ]); - if (version_compare(app()->version(), '8.0', '>=')) { - // DumpCommand only exists since Laravel 8.0 or above - $this->commands([ - Commands\TenantDump::class, - ]); - } - $this->publishes([ __DIR__ . '/../assets/config.php' => config_path('tenancy.php'), ], 'config'); diff --git a/tests/CommandsTest.php b/tests/CommandsTest.php index de7d4303..5172d752 100644 --- a/tests/CommandsTest.php +++ b/tests/CommandsTest.php @@ -76,11 +76,6 @@ test('migrate command works with tenants option', function () { }); test('migrate command loads schema state', function () { - if (! isVersion8()) { - $this->markTestSkipped('DumpCommand only exists since Laravel 8.0 or above'); - } - - $tenant = Tenant::create(); expect(Schema::hasTable('schema_users'))->toBeFalse(); @@ -99,10 +94,6 @@ test('migrate command loads schema state', function () { }); test('dump command works', function () { - if (! isVersion8()) { - $this->markTestSkipped('DumpCommand only exists since Laravel 8.0 or above'); - } - $tenant = Tenant::create(); Artisan::call('tenants:migrate'); @@ -219,8 +210,3 @@ function databaseConnectionSwitchedToDefault() expect(DB::connection()->getDatabaseName())->toBe($originalDBName); } - -function isVersion8(): bool -{ - return version_compare(app()->version(), '8.0', '>='); -}