Closed
Description
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 test
command and you'll see that the service definition is constructed successfully.