TenantAtlas/apps/platform/app/Console/Commands/TenantConfigurationSyncDefaults.php
ahmido 2cd512915a feat: complete spec 424 security defaults content-backed comparable support (#491)
Implements spec 424 with comparable renderable capture/readiness changes and supporting tests/spec artifacts.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #491
2026-07-01 14:41:24 +00:00

29 lines
952 B
PHP

<?php
declare(strict_types=1);
namespace App\Console\Commands;
use App\Services\TenantConfiguration\ResourceTypeRegistry;
use App\Services\TenantConfiguration\SupportedScopeResolver;
use Illuminate\Console\Command;
final class TenantConfigurationSyncDefaults extends Command
{
protected $signature = 'tenant-configuration:sync-defaults';
protected $description = 'Synchronize Coverage v2 resource type and supported scope defaults.';
public function handle(ResourceTypeRegistry $resourceTypes, SupportedScopeResolver $supportedScopes): int
{
$resourceTypes->syncDefaults();
$supportedScopes->syncDefaults();
$this->info('Tenant configuration defaults synchronized.');
$this->line(sprintf('Active resource types: %d', $resourceTypes->active()->count()));
$this->line(sprintf('Active supported scopes: %d', $supportedScopes->activeScopes()->count()));
return self::SUCCESS;
}
}