Skip to content

AIBundle and Mcpbundle should configure services explicitly and expose only meaningful autowirable aliases #90

Open
@stof

Description

@stof

Currently, the bundles do not follow the rules applied in Symfony core (McpBundle does a mix):

  • their services are all register using the FQCN as id. This makes any of those concrete implementation available for autowiring (which also means that adding traceable decorators implementing an interface to integrate in the profiler would become a BC break btw).
  • they use autowiring and autoconfiguration, which means that the actual service definitions of the bundle can be impacted by autoconfiguration rules defined in projects, which will be a nightmare for people providing support in support channels (which includes myself)

Services should be registered under dedicated IDs (starting with ai. or mcp. to follow the best practices for shared bundles of using the bundle-specific prefix) and only supported autowirable types should have aliases registered using FQCN.
Services should also be wired explicitly to make maintenance and support easier by being sure that the actual service definition is the one we maintain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI BundleIssues & PRs about the AI integration bundleMCP BundleIssues & PRs about the MCP SDK integration bundle

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions