Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TESTS] Session tests for php 7.2 #1106

Closed
lonnieezell opened this issue Jul 20, 2018 · 5 comments
Closed

[TESTS] Session tests for php 7.2 #1106

lonnieezell opened this issue Jul 20, 2018 · 5 comments
Assignees

Comments

@lonnieezell
Copy link
Member

Tests are throwing the following error in multiple places, and should not be:

ErrorException: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

@lonnieezell
Copy link
Member Author

@jim-parry I believe I found the 2 locations where it's doing this:

  1. the DotEnv tests is writing to the env/putenv/etc and that seems to be causing it
  2. the SessionTest files are starting the session.

Since these are things that we definitely need to test, I'm not sure how best to tackle this. Too bad it's not just a warning, so we could turn warnings off...

@jim-parry
Copy link
Contributor

Ok. I will see what I can do refactoring these, perhaps to use VFSStream (the first) and to destroy any session as part of teardown (second one).

@jim-parry
Copy link
Contributor

Session testing was already on my list to revisit :)

@jim-parry jim-parry self-assigned this Jul 20, 2018
@samsonasik
Copy link
Member

I think session_write_close() when session_status() == PHP_SESSION_ACTIVE can be used for it like I did at zend-session zendframework/zend-session#107

@lonnieezell
Copy link
Member Author

Ooo - good thought. We'll try that shortly. Thanks @samsonasik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants