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
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Deadline propagation (#1): ContextMiddleware accepts an optional deadlineHeader; an incoming budget in whole milliseconds (1–999999999)
shortens the configured timeout, a longer or malformed value is ignored. PreflightClient and ContextClient take deadlineHeader and send the
remaining budget downstream.
BC — correlation ids (#2): CorrelationId now validates its value
(1–128 characters of A-Z a-z 0-9 . _ : -), adds isValid() and generate(). ContextMiddleware generates an id when the header is
missing or invalid (injectable correlationIdGenerator), so every request
has one, and stores it in the context. Both clients take correlationHeader to forward it; an explicit header on the request wins.
Exception mapping (#3): with an optional responseFactory, ContextMiddleware turns ContextExpiredException into expiredStatus
(504) and ContextCancelledException into cancelledStatus (499); off by
default. Adds psr/http-factory to the requirements.
BC — ContextClient (#4): rejects an object without a Guzzle-compatible request() method at construction; sends the body as its stream and keeps
the protocol version; sets http_errors => false, so 4xx/5xx responses are
returned like PSR-18; a transport failure after the budget ran out becomes ContextExpiredException with the transport exception as previous.
Requires rasuvaeff/context ^0.2. Package brought up to the monorepo
template (@api, #[Covers], missing repository files, README.ru.md,
release workflow, runnable example).