-
-
Notifications
You must be signed in to change notification settings - Fork 221
TracyExtension: Don't dispatch Debugger in a CLI #200
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
Conversation
|
Thanks! |
|
This is the simplest possible solution, thanks @dg for your mentoring. |
|
PHP_SAPI is not part of DI container cache key. The condition should IMHO be evaluated in runtime. |
|
It is "coincidentally" part of cache key, the question is whether make it official part of key, or modify implementation of extensions or leave it as is. |
|
There is also a parameter
I can change this PR something like: $initialize->addBody('if (PHP_SAPI !== 'cli' && $tmp = $this->getByType("Nette\Http\Session", FALSE)) { $tmp->start(); Tracy\Debugger::dispatch(); };');But it seems unclear to me, I'm not sure with it. |
|
@dg I think that it should be possible to generate DI container for application from CLI. |
|
It would actually be parameter for TracyExtension, like $debugMode . |
|
@hranicka can you change it this way? nette/http@27c3de5#diff-e18d2abacdd85c4cc65b1a8d611ca31f |
|
Ok, I edit it. I've tried use config parameters with Constructor parameters seems better.
|
3bf9b11 to
916acb3
Compare
|
👍 |
|
I can prepare you PR into nette/bootstrap for your changes in nette/http and tracy. Give me a few minutes. |
|
I have it finished. |
|
Ok, thanks :) |
See #198
I've disabled Session/Debugger dispatching in for CLI SAPI.
It's needed only for Ajax.