Closed
Description
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)