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

DI Extension: bar panel is recreated #329

Closed
milo opened this issue Nov 1, 2018 · 1 comment
Closed

DI Extension: bar panel is recreated #329

milo opened this issue Nov 1, 2018 · 1 comment

Comments

@milo
Copy link
Member

@milo milo commented Nov 1, 2018

Tracy v2.5.3, DI v2.4.14

When I setup DI container in this way:

services:
    panel: MyPanel

tracy:
    bar:
        - @panel

and I load MyPanel from container before the Tracy is initialized (by @var MyPanel @inject on presenter), the panel service is created twice, because in generated container initialize() is:

$this->getService('tracy.bar')->addPanel($this->createServiceMyPanel());

# IMHO there should be
$this->getService('tracy.bar')->addPanel($this->getService('panel'));

If you hint me please in which way I should fix it, I'll send PR.

@milo

This comment has been minimized.

Copy link
Member Author

@milo milo commented Nov 2, 2018

Thank you. I thought that it is DI issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.