Problem
fakeHttp() does not call FinalizerInterface::finalize() after handling
requests.
In production with RoadRunner, Http\Dispatcher calls
$this->finalizer->finalize(false) after each request. This triggers
cleanup registered by bootloaders (e.g., Cycle ORM heap cleanup in
CycleOrmBootloader).
Since fakeHttp() bypasses the dispatcher, finalizers are never called,
causing state to leak between sequential requests in the same test.
Suggestion
Call FinalizerInterface::finalize(false) in FakeHttp::handleRequest()
after processing the request, matching the RoadRunner dispatcher behavior.
Problem
fakeHttp()does not callFinalizerInterface::finalize()after handlingrequests.
In production with RoadRunner,
Http\Dispatchercalls$this->finalizer->finalize(false)after each request. This triggerscleanup registered by bootloaders (e.g., Cycle ORM heap cleanup in
CycleOrmBootloader).Since
fakeHttp()bypasses the dispatcher, finalizers are never called,causing state to leak between sequential requests in the same test.
Suggestion
Call
FinalizerInterface::finalize(false)inFakeHttp::handleRequest()after processing the request, matching the RoadRunner dispatcher behavior.