Skip to content

fakeHttp() should call FinalizerInterface after each request  #86

Description

@chiost

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions