You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer I want the HTTP transport to implement PSR-18/17 so I can swap Guzzle for any HTTP client and get typed exceptions instead of hasError() checks So that I'm not locked into a single HTTP library and I know exactly what went wrong (401 vs 404 vs 422 vs 429)
As a developer I want the HTTP transport to implement PSR-18/17 so I can swap Guzzle for any HTTP client and get typed exceptions instead of
hasError()checks So that I'm not locked into a single HTTP library and I know exactly what went wrong (401 vs 404 vs 422 vs 429)Acceptance Criteria
RequestHandlerInterfacedefinesrequest(),get(),post(),put(),delete(),getLastResponse(),setOnBehalfOfUser()RequestHandleraccepts PSR-18ClientInterface+ PSR-17 factories +$baseUrlAuthenticationException, 404→NotFoundException, 422→ValidationException(with$errors), 429→RateLimitException(with$retryAfterSeconds), 5xx→ServerErrorExceptionNetworkExceptionon transport errors (DNS, timeout, connection refused)RetryAfterMiddlewareas PSR-18 decorator: catches 429, readsRetry-Afterheader, sleeps, retries (max 3x)ZammadExceptioninterface — all 6 exception classes implement itRequestHandlerTest(7 mapping tests) +RetryAfterMiddlewareTest(retry, pass-through, exhaustion)Castutility:dateTime(),string(),intOrNull(),boolOrNull()for scalar coercionphpstan level=max, tests green