8000 [DependencyInjection][FrameworkBundle] `lint:container` incorrectly marks service closures as not callable · Issue #40773 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[DependencyInjection][FrameworkBundle] lint:container incorrectly marks service closures as not callable #40773
Closed
@derrabus

Description

@derrabus

Symfony version(s) affected: 5.2.6

Description
Under some circumstances, the lint:container command incorrectly fails on service closures being passed to a parameter declared as callable. This caused doctrine/DoctrineMigrationsBundle#413 and currently breaks the CI of the Symfony demo app.

How to reproduce
https://github.com/derrabus/di-sca-reproducer

Run the lint:container command and you'll get the following error.

[ERROR] Invalid definition for service "a": argument 2 of "App\A::setDependency()" accepts "callable", "App\B" passed.

However, run the testcommand and you'll see that the service definition is constructed successfully.

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

      0