Skip to content
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

Problem with DI registering Tracy on project without Debugger enabled #245

Closed
paranoiq opened this issue Sep 30, 2020 · 0 comments
Closed

Comments

@paranoiq
Copy link

paranoiq commented Sep 30, 2020

i have quite specific use-case: i am using Tracy\Debugger and Dumper in my remote dumper. the remote dumper is auto-prepended in php config. it includes either its own Tracy or Tracy from the project it is used on.

so far everything worked ok, until i started using an app which does use Nette\DI, but does not use Tracy.

DIExtension detects Tracy just by checking for existence of IBarPanel interface and then it fails because it tries to get from DI container the BarPanel service, which is not there, because neither Configurator::enableDebugger() nor Debugger::enable() was called.

i could make (and will make) some workaround, but still have to ask: is this the right or the only way to detect Tracy? should mere existence of a class trigger an action when there are methods specifically designed to enable Debugger? 🤔

where it happens:

if ($this->debugMode && $this->config->debugger) {
     $this->enableTracyIntegration();
}

after some thought, i think some $container->hasService() would fix it? but i am not sure how the compilation works and when is the right time...

@dg dg closed this as completed in 5a5211d Oct 6, 2020
dg added a commit to nette/application that referenced this issue Oct 6, 2020
dg added a commit to nette/application that referenced this issue Oct 6, 2020
dg added a commit to nette/security that referenced this issue Oct 6, 2020
dg added a commit to nette/database that referenced this issue Oct 6, 2020
dg added a commit to nette/security that referenced this issue Oct 15, 2020
dg added a commit to nette/database that referenced this issue Oct 15, 2020
dg added a commit to nette/database that referenced this issue Oct 15, 2020
dg added a commit to nette/security that referenced this issue Oct 15, 2020
dg added a commit to nette/database that referenced this issue Oct 15, 2020
dg added a commit to nette/security that referenced this issue Oct 15, 2020
dg added a commit to nette/database that referenced this issue Oct 25, 2020
dg added a commit to nette/application that referenced this issue Oct 27, 2020
dg added a commit to nette/security that referenced this issue Nov 2, 2020
dg added a commit to nette/union that referenced this issue Feb 17, 2021
dg added a commit to nette/union that referenced this issue Mar 3, 2021
dg added a commit to nette/union that referenced this issue Mar 3, 2021
dg added a commit to nette/union that referenced this issue Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant