From e23c5ce12f3a78eaa8d2042c4d1e38412669c6f8 Mon Sep 17 00:00:00 2001 From: Michael Schiemer Date: Wed, 5 Nov 2025 03:51:20 +0100 Subject: [PATCH] fix(Infrastructure): correct PHP 8.0+ parameter order and interface signatures - MinIoClient: Move required parameters before optional ones - Fixes PHP 8.0+ deprecation warning - Required deps (RandomGenerator, HmacService, HttpClient) now before optional ($region, $usePathStyle) - ErrorAggregatorInterface: Align signature with implementation - Changed from ErrorHandlerContext to Throwable + ExceptionContextProvider pattern - Matches existing ErrorAggregator implementation - Maintains flexibility with isDebug flag --- src/Framework/ErrorAggregation/ErrorAggregatorInterface.php | 6 +++--- src/Infrastructure/Storage/MinIoClient.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Framework/ErrorAggregation/ErrorAggregatorInterface.php b/src/Framework/ErrorAggregation/ErrorAggregatorInterface.php index 449cf8f4..b634f1ee 100644 --- a/src/Framework/ErrorAggregation/ErrorAggregatorInterface.php +++ b/src/Framework/ErrorAggregation/ErrorAggregatorInterface.php @@ -5,7 +5,7 @@ declare(strict_types=1); namespace App\Framework\ErrorAggregation; use App\Framework\Exception\Core\ErrorSeverity; -use App\Framework\Exception\ErrorHandlerContext; +use App\Framework\ExceptionHandling\Context\ExceptionContextProvider; /** * Interface for error aggregation services @@ -15,9 +15,9 @@ use App\Framework\Exception\ErrorHandlerContext; interface ErrorAggregatorInterface { /** - * Processes a new error from ErrorHandlerContext + * Processes a new error using exception and context provider */ - public function processError(ErrorHandlerContext $context): void; + public function processError(\Throwable $exception, ExceptionContextProvider $contextProvider, bool $isDebug = false): void; /** * Gets error statistics for a time period diff --git a/src/Infrastructure/Storage/MinIoClient.php b/src/Infrastructure/Storage/MinIoClient.php index 435bd176..036bff99 100644 --- a/src/Infrastructure/Storage/MinIoClient.php +++ b/src/Infrastructure/Storage/MinIoClient.php @@ -37,11 +37,11 @@ final readonly class MinIoClient string $endpoint, private string $accessKey, private string $secretKey, - private string $region = 'us-east-1', - private bool $usePathStyle = true, private RandomGenerator $randomGenerator, private HmacService $hmacService, - private CurlHttpClient $httpClient + private CurlHttpClient $httpClient, + private string $region = 'us-east-1', + private bool $usePathStyle = true ) { // Normalize endpoint (remove trailing slash) $this->endpoint = rtrim($endpoint, '/');