ISession added#198
Conversation
| public function render() | ||
| { | ||
| $useSession = $this->dispatched && session_status() === PHP_SESSION_ACTIVE; | ||
| $useSession = $this->dispatched && Debugger::getSession()->isActive(); |
There was a problem hiding this comment.
Maybe this file should be untouched (session_status() === PHP_SESSION_ACTIVE)?
|
Simply don't call |
|
@dg But This is my problem. I have fake session, but with v2.4 it doesn't work correctly because Tracy checks for |
|
Yes :-) |
|
@dg What about if I replace with ? |
|
It is needed for AJAX requests and redirects in bar. |
I run a CLI application in a debug mode (development, CI).
But Tracy v2.4 is starting a session automatically and itselfs: [1], [2].
I can't solve this by fake session object. When DI Container is initialized,
session_start()is called and I do nothing with it.So I've extracted
session_*code intoISessioninterface which should allow set custom ISession implementation. It is useful in a CLI when debug mode is enabled.https://forum.nette.org/cs/26250-pojdte-otestovat-nette-2-4-rc?p=3#p175951
http://zlml.cz/fix-compatibility-with-nette-2-4#comment-2740141135