Skip to content

[FrameworkBundle][DI] lint:container fails on errored definitions #34858

Closed
@ro0NL

Description

@ro0NL

Symfony version(s) affected: 4.4.1

Description
Classes excluded from PSR service disocvery still cause errors when linting the container.

How to reproduce
Put an entity with requried constructor arguments in src/Entity and configure PSR service discovery:

App\:
    resource: '../src/*'
    exclude: '../src/{Command,DependencyInjection,Entity,Event,Exception,Model,Migrations,Kernel.php}'
$ bin/console lint:container

Invalid definition for service ".errored..service_locator.a6hFUa8.App\Entity\Some": "App\Entity\Some::__construct()" requires 3 arguments, 0 passed.

To me, the .errored part is a hint this should be skipped 🤔

Additional context
#34562 (comment)

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