-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
BrowserKitBugHelp wantedIssues and PRs which are looking for volunteers to complete them.Issues and PRs which are looking for volunteers to complete them.HttpFoundationStalledStatus: Reviewed
Description
Symfony version(s) affected
6.1
Description
Symfony\Component\HttpFoundation\StreamedResponse
is not working in tests (BrowserKit) after Symfony is upgraded to 6.1 - the output is not rendered.
How to reproduce
When asserting that following StreamedResponse
using BrowserKit produces 'test'
output:
return new StreamedResponse(static function (): void {
echo 'test';
});
the test is passing on Symfony 6.0 (see reproducer app: https://github.com/HtunHtunHtet/bug_app/tree/main) but starts to fail after upgrading to 6.1-RC1 (see: https://github.com/HtunHtunHtet/bug_app/tree/symfony-6.1) as the output is empty:
Below information is the output of the PHPUnit test.
Time: 00:00.150, Memory: 12.00 MB
There was 1 failure:
1) App\Tests\DefaultControllerTest::testSomething
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'test'
+''
Only the tests are affected as navigating to the controller page returns a correct response.
Possible Solution
No response
Additional Context
It might be related to recent StreamedResponseListener
deprecation: #45476
IonBazan, trandbert37, mmarton, miladrahimi and encreinformatique
Metadata
Metadata
Assignees
Labels
BrowserKitBugHelp wantedIssues and PRs which are looking for volunteers to complete them.Issues and PRs which are looking for volunteers to complete them.HttpFoundationStalledStatus: Reviewed