Session extension cannot be used in a loop/CLI since 7.2

  100841
October 9, 2017 11:20 nicolas.grekas@gmail.com (Nicolas Grekas)
Hello,

I'm having a hard time fixing Symfony's tests suite to 7.2 because of the
added warnings+ini_set-rejections in the Session module.

Testing the session on the CLI is not possible anymore without starting one
PHP process per test case. Why not, you may say.

BUT, this also means that the session module is now basically useless in a
request-response loop.
That means ReactPHP, PHP-PM, Amp & the likes are all going to have to
rewrite a userland session module completely. That also means e.g. Symfony
and all other frameworks will have to move away from the internal's Session
module if they want to work also with these long living processing model.

PHP is less "generic" now - with stronger bindings to its short lived
req/resp. cycle.
Is it something internal should care about? Should we reconsider this for
7.2?

Regards,
Nicolas
  100842
October 9, 2017 14:28 danack@basereality.com (Dan Ackroyd)
Hey Nicolas,

Please could you open a bug with a reproduce case of what worked
before, and what doesn't work now, so that it is clear what the change
was.

I wasn't aware that there was a change that would make the session
handler that much harder to use outside of the single
requests/response environment.

> That means ReactPHP, PHP-PM, Amp & the likes are all going to have to > rewrite a userland session module completely.
That sounds like a _fantastic_ idea long term. I have been working on that idea for a while....but keep getting distracted by various more fun activities. cheers Dan Ack
  100843
October 9, 2017 15:47 me@kelunik.com (Niklas Keller)
> > I'm having a hard time fixing Symfony's tests suite to 7.2 because of the > added warnings+ini_set-rejections in the Session module. > > Testing the session on the CLI is not possible anymore without starting one > PHP process per test case. Why not, you may say. > > BUT, this also means that the session module is now basically useless in a > request-response loop. > That means ReactPHP, PHP-PM, Amp & the likes are all going to have to > rewrite a userland session module completely.
We already have a custom session module, because the internal session module doesn't really work well for Aerys. Regards, Niklas
  100872
October 12, 2017 12:06 bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=)
Den 2017-10-09 kl. 13:20, skrev Nicolas Grekas:
> Hello, > > I'm having a hard time fixing Symfony's tests suite to 7.2 because of the > added warnings+ini_set-rejections in the Session module. > > Testing the session on the CLI is not possible anymore without starting one > PHP process per test case. Why not, you may say. > > BUT, this also means that the session module is now basically useless in a > request-response loop. > That means ReactPHP, PHP-PM, Amp & the likes are all going to have to > rewrite a userland session module completely. That also means e.g. Symfony > and all other frameworks will have to move away from the internal's Session > module if they want to work also with these long living processing model. > > PHP is less "generic" now - with stronger bindings to its short lived > req/resp. cycle. > Is it something internal should care about? Should we reconsider this for > 7.2? > > Regards, > Nicolas > One aspect that comes to mind is if this has a negative impact
on the adaptation / uptake of 7.2 once it's released? Could be valuable to have the RMs view on this changed behaviour. r//Björn
  100903
October 15, 2017 22:20 smalyshev@gmail.com (Stanislav Malyshev)
Hi!

> I'm having a hard time fixing Symfony's tests suite to 7.2 because of the > added warnings+ini_set-rejections in the Session module. > > Testing the session on the CLI is not possible anymore without starting one > PHP process per test case. Why not, you may say.
That doesn't sound good, do you have details why exactly these things do not work? Generally, I don't see why anything in sessions should not be reuseable within the context of the request.
> Is it something internal should care about? Should we reconsider this for > 7.2?
I think yes. -- Stas Malyshev smalyshev@gmail.com