Skip to content

[DependencyInjection] Optimized autowiring breaks existing installations #48138

@brusch

Description

@brusch

Symfony version(s) affected

6.2-dev

Description

Regression caused by #46279

Registering Response as an abstract service here, causes the following error message:

The definition ".service_locator.Fz2ZPLc" has a reference to an abstract definition "Symfony\Component\HttpFoundation\Response". Abstract definitions cannot be the target of references.

How to reproduce

Just use an existing Symfony project with 6.2-dev and build the container.
See also https://github.com/pimcore/pimcore/actions/runs/3408995937/jobs/5670226500#step:7:702

Possible Solution

Removing the following line fixes the issue for me:

->set(Response::class)->abstract()->tag('container.excluded')

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