Files
breadcrumb-the-shire/lib/Service/Audit/ApiAuditServiceInterface.php
fs a17c2c7cea refactor(audit): decouple API audit classes from core via interfaces
Core code (lib/) no longer imports any MintyPHP\Module\Audit\* classes directly.
New ApiAuditServiceInterface and ApiSystemAuditReporterInterface follow the
existing pattern (interface + null implementation in core, concrete binding
from module registrar). DoctorRunner and helpers/app.php now resolve through
DI interfaces, ensuring the audit module remains fully optional.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 19:19:17 +02:00

19 lines
484 B
PHP

<?php
namespace MintyPHP\Service\Audit;
/**
* Core-side contract for API request audit tracking.
*
* Implemented by the audit module's ApiAuditService when the module is active.
* Falls back to NullApiAuditService (no-op) when the audit module is disabled.
*/
interface ApiAuditServiceInterface
{
public function startRequestContext(): void;
public function finish(int $statusCode, ?string $errorCode = null): void;
public function currentRequestId(): ?string;
}