Nexus API Reference

ConnectionScopeMiddleware
in package
implements MiddlewareInterface

Read onlyYes
FinalYes
Tags
psalm-api

Scopes a ConnectionLease to one HTTP request. The lease is acquired lazily via $lease->get() and always released at the end of the request.

Poisoning policy: only Doctrine\DBAL\Exception (and subclasses) marks the connection as poisoned, which evicts it from the pool. Domain or HTTP exceptions (e.g. validation, 404) release the connection back to the pool intact — they don't corrupt the connection's transaction or session state, so evicting them would needlessly shrink the pool.

Table of Contents

Interfaces

MiddlewareInterface

Methods

__construct()  : mixed
process()  : ResponseInterface

Methods

process()

public process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
$request : ServerRequestInterface
$handler : RequestHandlerInterface
Return values
ResponseInterface

        
On this page

Search results