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

@@ -32,7 +32,7 @@ function setAppContainer(\MintyPHP\App\AppContainer $container): void
$GLOBALS['minty_app_container'] = $container;
\MintyPHP\Http\ApiAuth::configure(
static fn (): \MintyPHP\Service\Auth\AuthScopeGateway => $container->get(\MintyPHP\Service\Auth\AuthScopeGateway::class),
static fn (): \MintyPHP\Service\Tenant\TenantScopeService => $container->get(\MintyPHP\Service\Tenant\TenantScopeService::class),
static fn (): \MintyPHP\Service\Auth\ApiTokenService => $container->get(\MintyPHP\Service\Auth\ApiTokenService::class),
static fn (): \MintyPHP\Repository\Access\UserRoleRepository => $container->get(\MintyPHP\Repository\Access\UserRoleRepository::class),
static fn (): \MintyPHP\Repository\Access\RolePermissionRepository => $container->get(\MintyPHP\Repository\Access\RolePermissionRepository::class),
@@ -192,14 +192,14 @@ function appSetting(string $key): ?string
*/
function appThemes(): array
{
if (!class_exists('MintyPHP\\Service\\Settings\\ThemeConfigService')) {
if (!class_exists('MintyPHP\\Service\\Settings\\ThemeConfigGateway')) {
return [
'light' => 'Light',
'dark' => 'Dark',
];
}
return app(\MintyPHP\Service\Settings\ThemeConfigService::class)->all();
return app(\MintyPHP\Service\Settings\ThemeConfigGateway::class)->all();
}
/**