refactor(arch): enforce gateway compliance and remove service-wrapping gateways

This commit is contained in:
2026-03-13 11:31:33 +01:00
parent 082fa4c9a5
commit 892da0048d
96 changed files with 1117 additions and 1060 deletions

View File

@@ -9,7 +9,7 @@ use MintyPHP\Repository\Tenant\TenantRepositoryInterface;
class SettingServicesFactory
{
private ?ThemeConfigService $themeConfigService = null;
private ?ThemeConfigGateway $themeConfigService = null;
private ?SettingCacheService $settingCacheService = null;
private ?SettingsCryptoGatewayInterface $settingsCryptoGateway = null;
private ?SettingsMetadataGateway $settingsMetadataGateway = null;
@@ -53,7 +53,7 @@ class SettingServicesFactory
{
return $this->settingsAppGateway ??= new SettingsAppGateway(
$this->createSettingsMetadataGateway(),
$this->createThemeConfigService(),
$this->createThemeConfigGateway(),
);
}
@@ -105,9 +105,9 @@ class SettingServicesFactory
return $this->settingCacheService ??= new SettingCacheService();
}
public function createThemeConfigService(): ThemeConfigService
public function createThemeConfigGateway(): ThemeConfigGateway
{
return $this->themeConfigService ??= new ThemeConfigService();
return $this->themeConfigService ??= new ThemeConfigGateway();
}
public function createSettingsCryptoGateway(): SettingsCryptoGatewayInterface

View File

@@ -8,7 +8,7 @@ class SettingsAppGateway
{
public function __construct(
private readonly SettingsMetadataGateway $settingsMetadataGateway,
private readonly ThemeConfigService $themeConfigService
private readonly ThemeConfigGateway $themeConfigService
) {
}

View File

@@ -2,7 +2,7 @@
namespace MintyPHP\Service\Settings;
class ThemeConfigService
class ThemeConfigGateway
{
private const DEFAULT_THEMES = [
'light' => 'Light',