Skip to content

Symfony 6.3@dev Unexpected ini_set(): Session ini settings cannot be changed after headers have already been sent #49387

@alexander-schranz

Description

@alexander-schranz

Symfony version(s) affected

6.3.0@dev (6.2.*@dev works)

Description

Something seems to be merged into Symfony 6.3 branch which currently let our CI fail on it with:

Warning
PHP Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /home/runner/work/sulu/sulu/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php on line 48
PHP Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /home/runner/work/sulu/sulu/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php on line 49

So it looks some changes in the Session handling. Not sure what it could be, shortly looked at the merged Pull Requests I didn't see why it is happening.

I tested out 6.2.*@dev there all seems to work still like expected.

If somebody have a hint which PR could have introduced the error let me know, happy to test it out.

How to reproduce

git clone git@github.com:sulu/sulu.git
cd sulu

composer config minimum-stability dev
composer update

env DATABASE_URL="mysql://root:ChangeMe@127.0.0.1:3306/sulu?serverVersion=8.0.27&charset=utf8mb4" composer bootstrap-test-env
env DATABASE_URL="mysql://root:ChangeMe@127.0.0.1:3306/sulu?serverVersion=8.0.27&charset=utf8mb4" composer test

Possible Solution

Workaround see: #49387 (comment)

Additional Context

The change need to be somewhere between Januaray 25 and February 6 and only Symfony 6.3:

Bildschirmfoto 2023-02-15 um 11 33 19

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