WorkerRequestCompletedEvent
Emitted once per request from Kernel’s worker-mode reset step — after WorkerManager::resetForNextRequest() (if worker mode is active), regardless of whether the request succeeded or the pipeline threw.
This is the per-request-boundary counterpart to KernelBootEvent: a plugin that builds worker-lifetime state at boot (e.g. a batching span/metric exporter) uses this to flush it before the worker serves the next request, instead of Kernel naming that plugin’s class directly.
Distinct from ResponseSendingEvent: that one fires inside Context::handle() just before a successful response is returned, so it never fires on a pre-pipeline failure. This one always fires, once per request, at the outermost worker boundary.
Synopsis
Section titled “Synopsis”final class WorkerRequestCompletedEvent extends Event
| Extends | Event |
| Source | Event/Lifecycle/WorkerRequestCompletedEvent.php |
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
$context | Context | readonly. |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(Context $context): mixed
| Parameter | Type | Description |
|---|---|---|
$context | Context |
Returns mixed