feat: add read-only System Info admin page with health checks and module inventory
New page at /admin/system-info with three tabs: - Overview: PHP version, SAPI, environment, 6 health checks (DB, schema, storage, RBAC baseline, admin role, scheduler heartbeat) - Modules: table of active modules with version, dependencies, permission count - Permissions: active/inactive counts and per-source breakdown Gated behind new system_info.view permission assigned to Admin role. No mutations — purely diagnostic/observability. Includes SystemHealthService, SystemInfoService, SystemHealthRepository with interface, DI registration, i18n keys (de+en), idempotent DB update script, and 17 new PHPUnit tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ namespace MintyPHP\App\Container\Registrars;
|
||||
|
||||
use MintyPHP\App\AppContainer;
|
||||
use MintyPHP\App\Container\ContainerRegistrar;
|
||||
use MintyPHP\App\Module\ModuleRegistry;
|
||||
use MintyPHP\Http\ApiSystemAuditReporter;
|
||||
use MintyPHP\Http\CookieStore;
|
||||
use MintyPHP\Http\CookieStoreInterface;
|
||||
@@ -42,6 +43,9 @@ use MintyPHP\Service\Security\RateLimiterService;
|
||||
use MintyPHP\Service\Security\SecurityServicesFactory;
|
||||
use MintyPHP\Service\Settings\SettingsFrontendTelemetryGateway;
|
||||
use MintyPHP\Service\Stats\AdminStatsViewDataService;
|
||||
use MintyPHP\Service\System\SystemHealthService;
|
||||
use MintyPHP\Service\System\SystemInfoService;
|
||||
use MintyPHP\Repository\System\SystemHealthRepository;
|
||||
|
||||
final class AppServicesRegistrar implements ContainerRegistrar
|
||||
{
|
||||
@@ -50,6 +54,15 @@ final class AppServicesRegistrar implements ContainerRegistrar
|
||||
$container->set(AdminStatsViewDataService::class, static fn (AppContainer $c): AdminStatsViewDataService => new AdminStatsViewDataService(
|
||||
$c->get(AdminStatsRepository::class)
|
||||
));
|
||||
$container->set(SystemHealthRepository::class, static fn (): SystemHealthRepository => new SystemHealthRepository());
|
||||
$container->set(SystemHealthService::class, static fn (AppContainer $c): SystemHealthService => new SystemHealthService(
|
||||
$c->get(SystemHealthRepository::class)
|
||||
));
|
||||
$container->set(SystemInfoService::class, static fn (AppContainer $c): SystemInfoService => new SystemInfoService(
|
||||
$c->get(SystemHealthService::class),
|
||||
$c->get(SystemHealthRepository::class),
|
||||
$c->has(ModuleRegistry::class) ? $c->get(ModuleRegistry::class) : null
|
||||
));
|
||||
$container->set(SearchDataService::class, static fn (AppContainer $c): SearchDataService => new SearchDataService(
|
||||
$c->get(PermissionService::class),
|
||||
$c->get(UserTenantRepository::class),
|
||||
|
||||
Reference in New Issue
Block a user