Registers Runner services for each check group as named argument aliases. It is now possible to inject a specific runner into a controller or other service by naming the argument to match the group name:
public function __construct(private Runner $fooRunner) {} // Injects liip_monitor.runner_foo
public function __construct(private Runner $defaultRunner) {} // Injects liip_monitor.runner_default
public function __construct(private Runner $runner) {} // Injects liip_monitor.runner (alias of liip_monitor.runner_default)
This is a common practice in Symfony world, used for example in symfony/http-client or league/flysystem-bundle.
Should Runner be an alias for the default runner? Should your third example above just inject the default runner? I believe that's how (at least) symfony/http-client works.
Registers
Runner
services for each check group as named argument aliases. It is now possible to inject a specific runner into a controller or other service by naming the argument to match the group name:This is a common practice in Symfony world, used for example in
symfony/http-client
orleague/flysystem-bundle
.