Skip to content

DI Extension: bar panel is recreated #329

@milo

Description

@milo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions