8000 [bug] FrameworkBundle::request() does not call kernel->terminate(). · Issue #6737 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[bug] FrameworkBundle::request() does not call kernel->terminate(). #6737
Closed
@tarjei

Description

@tarjei

When running tests using the WebTestCase, kernel->terminate() is not called. It seems that this happens because Symfony/Bundle/FrameworkBundle/Client.php overrides the doRequest method without calling kernel->terminate().

Suggested fix:

diff --git a/src/Symfony/Bundle/FrameworkBundle/Client.php b/src/Symfony/Bundle/FrameworkBundle/Client.php
index cd6309b..f032a62 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Client.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Client.php
@@ -77,8 +77,7 @@ class Client extends BaseClient
         } else {
             $this->hasPerformedRequest = true;
         }
-
-        return $this->kernel->handle($request);
+        return parent::doRequest($request);

I can provide a PR if needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0