Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[HttpFoundation] Failed to set session handler, headers already sent by phpunit #24524

Copy link
Copy link
Closed
@anlutro

Description

@anlutro
Issue body actions
Q A
Bug report? yes
Feature request? no
BC Break report? yes
RFC? no
Symfony version 3.4.x

I have a project that depends on symfony/http-foundation. With 3.4.x-dev I'm getting some RuntimeErrors recently:

RuntimeException: Failed to set the session handler because headers have already been sent
by ".../vendor/phpunit/phpunit/src/Util/Printer.php" at line 110.

.../vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:397
.../vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:112
.../classes/Http/SessionProvider.php:128
.../vendor/autarky/container/classes/Factory/Factory.php:89
.../vendor/autarky/container/classes/Container.php:256
.../vendor/autarky/container/classes/Container.php:226
.../classes/Application.php:511
.../tests/unit/Session/SessionProviderTest.php:20

I tracked down the line to #23711 which was merged 2 days ago. If I remove the if headers_sent thing from setSaveHandler, my test runs fine again.

PHPUnit 5.7.22, symfony/http-foundation is at 0fe9b3d

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.