Skip to content

[DX][DependencyInjection] track the source of where the service definition comes from @dev #62288

@dkarlovi

Description

@dkarlovi

Description

When the container is created, it contains a bunch of various services. This can be caused by various config files (YAML, XML, PHP), compiler passes, bundles, etc.

This information is valuable from the DX POV because various tooling around Symfony (JetBrains plugin, LSPs etc) need this information to navigate from services to their sources. The current approach is to scan the various possible sources and try to deduce this information, which is difficult and error prone. It also means a huge barrier of entry for this type of feature in a new tool.

What could happen is, Symfony could track this information itself and:

  1. provide it in the dumped XML
  2. use it in own tooling, say in debug:container
  3. used by compilation exceptions (thanks @GromNaN!)

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    DXDX = Developer eXperience (anything that improves the experience of using Symfony)DependencyInjectionFeatureHelp wantedIssues and PRs which are looking for volunteers to complete them.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions