Closed
Description
Symfony version(s) affected
5.4+
Description
When your Kernel implements an interface that is registered for auto-configuration, the following error occurs when running lint:container
:
[ERROR] Invalid definition for service "kernel": Symfony\Component\HttpKernel\Kernel::__construct()" requires 2 arguments, 0 passed.
This only appears to be a problem for the lint command. The kernel is auto-configured correctly and behaves as expected.
How to reproduce
git clone git@github.com:kbond/lint-container-reproducer.git
cd lint-container-reproducer
composer install
bin/console lint:container # throws exception
Possible Solution
Additional Context
Seems similar to #40868.
Commit on my reproducer that causes the failure: kbond/lint-container-reproducer@8676d5f