Skip to content

[DependencyInjection] lint:container fails if kernel implements interface registered for autoconfiguration #44972

Closed
@kbond

Description

@kbond

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

#44972.

Additional Context

Seems similar to #40868.

Commit on my reproducer that causes the failure: kbond/lint-container-reproducer@8676d5f

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