-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Description
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
BC Break report? | no |
RFC? | yes |
Symfony version | x.y.z |
It'd be nice if the exclude value could be an array of patterns. I have quite a few classes that I want to exclude from autowiring and a single glob string is getting a bit unwieldy.
Normally, this wouldn't be a problem when all services are private since the DIC removes them if unused, therefore there would be no need to exclude them.
However, in the test environment only, I'm marking all services as public with a compiler pass. (This may be a bad idea.. idk). The reason I'm doing that is that I need to access some services from the container in various functional tests, and I'm getting the warning about accessing private services with ->get(..) to be removed in 4.0.
I thought about tagging those specific services for the compiler pass to recognize and change them to public, but I'm trying to avoid adding DIC config after I was able to delete most of my DIC config since autowiring.