refactor(http): make the session facade per-request
The shared Session facade now implements ResetInterface, so the kernel drops the bags
of the request it has served before serving the next one. An open session belongs to
the request being served (the FPM boot opens it before the kernel runs) and is left
alone.
Session::save() moves into the finally block of Kernel::handle(): a cycle that throws
no longer leaves its session open for the next one, which is what lets an open session
be read as the current request's.
Also: the console application implements ResetInterface, so the instanceof rule tagged
it as resettable and every HTTP request built the whole CLI application just to reset
it. Its definition now sits before that rule, guarded by a container test.
of the request it has served before serving the next one. An open session belongs to
the request being served (the FPM boot opens it before the kernel runs) and is left
alone.
Session::save() moves into the finally block of Kernel::handle(): a cycle that throws
no longer leaves its session open for the next one, which is what lets an open session
be read as the current request's.
Also: the console application implements ResetInterface, so the instanceof rule tagged
it as resettable and every HTTP request built the whole CLI application just to reset
it. Its definition now sits before that rule, guarded by a container test.