Migration class declaration Error when used `spatie/multi-tenancy`
Muffinman opened this issue · 1 comments
We have a console command which runs all tenant migrations like below. Not sure what changed because this used to work fine as recently as march.
class TenantMigrate extends Command
{
protected $signature = 'tenant:migrate {--tenant=*}';
public function handle(): int
{
$this->call('tenants:artisan', [
'artisanCommand' => 'migrate --path=database/settings/tenant --database=tenant',
'--tenant' => $this->option('tenant'),
]);
return self::SUCCESS;
}
}
When trying to run this now, it fails on the first tenant with this error:
PHP Fatal error: Cannot declare class AddNotificationsEnabledSettings, because the name is already in use in /Users/matt/Sites/supersecretproject/database/settings/tenant/2023_06_05_145021_add_notifications_enabled.php on line 7
Symfony\Component\ErrorHandler\Error\FatalError
Cannot declare class AddNotificationsEnabledSettings, because the name is already in use
I dropped a ray()->backtrace()
into the migrations file and it is indeed being required twice:
#0 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(149): require_once()
#1 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(150): Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
#2 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(574): Illuminate\Filesystem\Filesystem->requireOnce('/Users/matt/Sit...')
#3 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(117): Illuminate\Database\Migrations\Migrator->requireFiles(Array)
#4 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(88): Illuminate\Database\Migrations\Migrator->run(Array, Array)
#5 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(633): Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations\{closure}()
#6 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(81): Illuminate\Database\Migrations\Migrator->usingConnection('tenant', Object(Closure))
#7 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Database\Console\Migrations\MigrateCommand->handle()
#8 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#9 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#10 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#11 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#12 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Command.php(208): Illuminate\Container\Container->call(Array)
#13 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\StringInput), Object(Illuminate\Console\OutputStyle))
#14 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Command.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\StringInput), Object(Illuminate\Console\OutputStyle))
#15 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Application.php(1081): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\StringInput), Object(Illuminate\Console\OutputStyle))
#16 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Database\Console\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\StringInput), Object(Illuminate\Console\OutputStyle))
#17 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\StringInput), Object(Illuminate\Console\OutputStyle))
#18 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Application.php(162): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\StringInput), Object(Illuminate\Console\OutputStyle))
#19 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(381): Illuminate\Console\Application->call('migrate', Array, Object(Illuminate\Console\OutputStyle))
#20 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(353): Illuminate\Foundation\Console\Kernel->call('migrate --path=...', Array, Object(Illuminate\Console\OutputStyle))
#21 /Users/matt/Sites/supersecretproject/vendor/spatie/laravel-multitenancy/src/Commands/TenantsArtisanCommand.php(34): Illuminate\Support\Facades\Facade::__callStatic('call', Array)
#22 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Spatie\Multitenancy\Commands\TenantsArtisanCommand->handle()
#23 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#24 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#25 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#26 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#27 /Users/matt/Sites/supersecretproject/vendor/spatie/laravel-multitenancy/src/Commands/Concerns/TenantAware.php(34): Illuminate\Container\Container->call(Array)
#28 /Users/matt/Sites/supersecretproject/vendor/spatie/laravel-multitenancy/src/Models/Tenant.php(97): Spatie\Multitenancy\Commands\TenantsArtisanCommand->Spatie\Multitenancy\Commands\Concerns\{closure}(Object(App\Models\Landlord\Tenant))
#29 /Users/matt/Sites/supersecretproject/vendor/spatie/laravel-multitenancy/src/Commands/Concerns/TenantAware.php(34): Spatie\Multitenancy\Models\Tenant->execute(Object(Closure))
#30 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Collections/LazyCollection.php(790): Spatie\Multitenancy\Commands\TenantsArtisanCommand->Spatie\Multitenancy\Commands\Concerns\{closure}(Object(App\Models\Landlord\Tenant), 0)
#31 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(738): Illuminate\Support\LazyCollection->Illuminate\Support\{closure}()
#32 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(473): Illuminate\Support\LazyCollection->reduce(Object(Closure), 0)
#33 /Users/matt/Sites/supersecretproject/vendor/spatie/laravel-multitenancy/src/Commands/Concerns/TenantAware.php(35): Illuminate\Support\LazyCollection->sum()
#34 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Command/Command.php(326): Spatie\Multitenancy\Commands\TenantsArtisanCommand->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
#35 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Command.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
#36 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(67): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
#37 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(28): Illuminate\Console\Command->runCommand('tenants:artisan', Array, Object(Illuminate\Console\OutputStyle))
#38 /Users/matt/Sites/supersecretproject/app/Console/Commands/System/Tenant/TenantMigrate.php(33): Illuminate\Console\Command->call('tenants:artisan', Array)
#39 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\System\Tenant\TenantMigrate->handle()
#40 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#41 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#42 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#43 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#44 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Command.php(208): Illuminate\Container\Container->call(Array)
#45 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#46 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Command.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#47 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Application.php(1081): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#48 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\System\Tenant\TenantMigrate), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#49 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#50 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(200): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#51 /Users/matt/Sites/supersecretproject/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#0 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(124): require()
#1 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(125): Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
#2 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(526): Illuminate\Filesystem\Filesystem->getRequire('/Users/matt/Sit...')
#3 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(208): Illuminate\Database\Migrations\Migrator->resolvePath('/Users/matt/Sit...')
#4 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(181): Illuminate\Database\Migrations\Migrator->runUp('/Users/matt/Sit...', 11, false)
#5 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(124): Illuminate\Database\Migrations\Migrator->runPending(Array, Array)
#6 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(88): Illuminate\Database\Migrations\Migrator->run(Array, Array)
#7 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(633): Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations\{closure}()
#8 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(81): Illuminate\Database\Migrations\Migrator->usingConnection('tenant', Object(Closure))
#9 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Database\Console\Migrations\MigrateCommand->handle()
#10 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#11 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#12 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#13 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#14 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Command.php(208): Illuminate\Container\Container->call(Array)
#15 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\StringInput), Object(Illuminate\Console\OutputStyle))
#16 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Command.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\StringInput), Object(Illuminate\Console\OutputStyle))
#17 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Application.php(1081): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\StringInput), Object(Illuminate\Console\OutputStyle))
#18 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Database\Console\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\StringInput), Object(Illuminate\Console\OutputStyle))
#19 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\StringInput), Object(Illuminate\Console\OutputStyle))
#20 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Application.php(162): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\StringInput), Object(Illuminate\Console\OutputStyle))
#21 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(381): Illuminate\Console\Application->call('migrate', Array, Object(Illuminate\Console\OutputStyle))
#22 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(353): Illuminate\Foundation\Console\Kernel->call('migrate --path=...', Array, Object(Illuminate\Console\OutputStyle))
#23 /Users/matt/Sites/supersecretproject/vendor/spatie/laravel-multitenancy/src/Commands/TenantsArtisanCommand.php(34): Illuminate\Support\Facades\Facade::__callStatic('call', Array)
#24 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Spatie\Multitenancy\Commands\TenantsArtisanCommand->handle()
#25 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#26 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#27 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#28 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#29 /Users/matt/Sites/supersecretproject/vendor/spatie/laravel-multitenancy/src/Commands/Concerns/TenantAware.php(34): Illuminate\Container\Container->call(Array)
#30 /Users/matt/Sites/supersecretproject/vendor/spatie/laravel-multitenancy/src/Models/Tenant.php(97): Spatie\Multitenancy\Commands\TenantsArtisanCommand->Spatie\Multitenancy\Commands\Concerns\{closure}(Object(App\Models\Landlord\Tenant))
#31 /Users/matt/Sites/supersecretproject/vendor/spatie/laravel-multitenancy/src/Commands/Concerns/TenantAware.php(34): Spatie\Multitenancy\Models\Tenant->execute(Object(Closure))
#32 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Collections/LazyCollection.php(790): Spatie\Multitenancy\Commands\TenantsArtisanCommand->Spatie\Multitenancy\Commands\Concerns\{closure}(Object(App\Models\Landlord\Tenant), 0)
#33 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(738): Illuminate\Support\LazyCollection->Illuminate\Support\{closure}()
#34 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(473): Illuminate\Support\LazyCollection->reduce(Object(Closure), 0)
#35 /Users/matt/Sites/supersecretproject/vendor/spatie/laravel-multitenancy/src/Commands/Concerns/TenantAware.php(35): Illuminate\Support\LazyCollection->sum()
#36 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Command/Command.php(326): Spatie\Multitenancy\Commands\TenantsArtisanCommand->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
#37 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Command.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
#38 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(67): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
#39 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(28): Illuminate\Console\Command->runCommand('tenants:artisan', Array, Object(Illuminate\Console\OutputStyle))
#40 /Users/matt/Sites/supersecretproject/app/Console/Commands/System/Tenant/TenantMigrate.php(33): Illuminate\Console\Command->call('tenants:artisan', Array)
#41 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\System\Tenant\TenantMigrate->handle()
#42 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#43 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#44 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#45 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#46 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Command.php(208): Illuminate\Container\Container->call(Array)
#47 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#48 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Console/Command.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#49 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Application.php(1081): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#50 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\System\Tenant\TenantMigrate), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#51 /Users/matt/Sites/supersecretproject/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#52 /Users/matt/Sites/supersecretproject/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(200): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#53 /Users/matt/Sites/supersecretproject/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
PHP Fatal error: Cannot declare class AddNotificationsEnabledSettings, because the name is already in use in /Users/matt/Sites/supersecretproject/database/settings/tenant/2023_06_05_145021_add_notifications_enabled.php on line 7
Is this a Laravel bug? I can't see anything in either package which would cause Laravel to forget it's static include cache. I notice Taylor did rename this static cache variable a few months ago.
Should this project be using anonymous classes?
Going to close this because I can't reproduce it again on a fresh repo with spatie/laravel-settings
and spatie/laravel-multitenancy
installed.
Must be something somewhere in my code which is causing it.