refactor(theme): drop dark-green and collapse theme registry to light/dark
Remove the extensible theme catalog (config/themes.php + ThemeConfigGateway) in favor of a two-entry const on SettingsAppGateway. appThemes() now returns the list directly — no container lookup, no file include. Drop the dark-green theme assets, narrow [data-theme^="dark"] selectors to [data-theme="dark"], and tighten isDarkTheme() to an exact match. Ship an idempotent migration that corrects any leftover 'dark-green' rows on users and tenants to safe defaults (light / NULL). Tenant scoping (default_theme, allow_user_theme) and per-user override stay intact; only the catalog extensibility and the third theme are removed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,6 @@ use MintyPHP\Repository\Tenant\TenantRepositoryInterface;
|
||||
|
||||
class SettingServicesFactory
|
||||
{
|
||||
private ?ThemeConfigGateway $themeConfigService = null;
|
||||
private ?SettingCacheService $settingCacheService = null;
|
||||
private ?SettingsCryptoGatewayInterface $settingsCryptoGateway = null;
|
||||
private ?SettingsMetadataGateway $settingsMetadataGateway = null;
|
||||
@@ -53,7 +52,6 @@ class SettingServicesFactory
|
||||
{
|
||||
return $this->settingsAppGateway ??= new SettingsAppGateway(
|
||||
$this->createSettingsMetadataGateway(),
|
||||
$this->createThemeConfigGateway(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -108,11 +106,6 @@ class SettingServicesFactory
|
||||
);
|
||||
}
|
||||
|
||||
public function createThemeConfigGateway(): ThemeConfigGateway
|
||||
{
|
||||
return $this->themeConfigService ??= new ThemeConfigGateway();
|
||||
}
|
||||
|
||||
public function createSettingsCryptoGateway(): SettingsCryptoGatewayInterface
|
||||
{
|
||||
return $this->settingsCryptoGateway ??= new SettingsCryptoGateway();
|
||||
|
||||
Reference in New Issue
Block a user