Get service via class name from iterable - injected tagged services
问题 I am struggling to get a specific service via class name from group of injected tagged services. Here is an example: I tag all the services that implement DriverInterface as app.driver and bind it to the $drivers variable. In some other service I need to get all those drivers that are tagged app.driver and instantiate and use only few of them. But what drivers will be needed is dynamic. services.yml _defaults: autowire: true autoconfigure: true public: false bind: $drivers: [!tagged app