symfony/symfony — pull request #9611 by Taluu (2013-11-25 16:39:16+00:00)
Title: When getting the session's id, check if the session is not closed

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no (shouldn't be)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~

This introduced a regression from #9246, with an incomplete fix ;

As the `started` flag on the NativeSessionStorage was not `true`
anymore when saving the session, the session id was always empty
when saving it, and thus when sending the `PHPSESSID` cookie.

The previous PR I made (#9530) was another approach to solve this regression, but this one should keep the fix made by @tecbot on #9246, and finish it with another verification. I may miss another place where `started` is used, but I don't really see which other conditions depending on this property should be altered...

I tried to alter the getId tests on the `NativeSessionStorage`, but I think it is missing a functionnal test to show it indeed broke before and is now fixed... Any idea ?

ping @drak, @jakzal