refactor(arch): enforce gateway compliance and remove service-wrapping gateways
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user