Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DependencyInjection] Optimized autowiring breaks existing installations #48138

Closed
@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