Skip to content

[FrameworkBundle] "Ghost" services when excluding non-matches #48607

@apfelbox

Description

@apfelbox

Symfony version(s) affected

6.2.1

Description

I have a bundle with a service MyBundle\SystemInformation\SystemInformation that I would like to include.
So I now edit my services.yaml and add an invalid exclusion rules, as I forgot the star:

services:
    _defaults:
        autoconfigure: true
        autowire: true

    MyBundle\:
        resource: ../src/*
        exclude:
            - ../src/SystemInformation #oops

If I now do a debug:container in the main application, it lists a non-existant service:

CleanShot 2022-12-12 at 11 52 59

CleanShot 2022-12-12 at 11 53 19

One thing to not here is that the original service is gone now. So maybe the dummy excluded service that is added due to #46279 just uses the wrong id?

How to reproduce

See above

Possible Solution

This will be fixed if #48606 is implemented. Not sure if this has more consequences somewhere else.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy