forked from fa/breadcrumb-the-shire
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:
36
lib/Repository/System/SystemHealthRepositoryInterface.php
Normal file
36
lib/Repository/System/SystemHealthRepositoryInterface.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Repository\System;
|
||||
|
||||
interface SystemHealthRepositoryInterface
|
||||
{
|
||||
public function checkDatabaseConnectivity(): bool;
|
||||
|
||||
/**
|
||||
* @param list<string> $requiredTables
|
||||
* @return list<string>
|
||||
*/
|
||||
public function listPresentTables(array $requiredTables): array;
|
||||
|
||||
/**
|
||||
* @return array{last_heartbeat_at: string, last_result: string, last_error_code: string}|null
|
||||
*/
|
||||
public function getSchedulerStatus(): ?array;
|
||||
|
||||
/**
|
||||
* @param list<string> $keys
|
||||
* @return list<string>
|
||||
*/
|
||||
public function listActivePermissionKeys(array $keys): array;
|
||||
|
||||
public function countAdminUsers(): int;
|
||||
|
||||
public function countActivePermissions(): int;
|
||||
|
||||
public function countInactivePermissions(): int;
|
||||
|
||||
/**
|
||||
* @return list<string>
|
||||
*/
|
||||
public function listAllActivePermissionKeys(): array;
|
||||
}
|
||||
Reference in New Issue
Block a user