refactor: enforce layer discipline — move repositories, fix constructor injection

- Move HelpdeskTenantSettingsRepository and HelpdeskTokenRepository from
  Service/ to Repository/ directory (GR-SEC-003: SQL only in repositories)
- Make AccessControl constructor require IntendedUrlService explicitly
  instead of falling back to `new IntendedUrlService()` (GR-TEST-002:
  no service instantiation outside factories)
- Update all imports and tests accordingly

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-13 19:28:07 +02:00
parent a17c2c7cea
commit 4e6b586b77
10 changed files with 21 additions and 12 deletions

View File

@@ -22,7 +22,7 @@ class AccessControl
private array $configuredPublicPaths;
private IntendedUrlService $intendedUrlService;
public function __construct(array $publicPaths = [], ?IntendedUrlService $intendedUrlService = null)
public function __construct(array $publicPaths, IntendedUrlService $intendedUrlService)
{
$normalizedPaths = [];
foreach ($publicPaths as $path) {
@@ -34,7 +34,7 @@ class AccessControl
}
$this->configuredPublicPaths = array_values(array_unique($normalizedPaths));
$this->intendedUrlService = $intendedUrlService ?? new IntendedUrlService();
$this->intendedUrlService = $intendedUrlService;
}
/**