We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6276bc7 + 185d4ca commit e8b0d40Copy full SHA for e8b0d40
service_container/service_subscribers_locators.rst
@@ -293,10 +293,11 @@ argument of type ``service_locator``:
293
294
$services->set(CommandBus::class)
295
->args([service_locator([
296
- 'App\FooCommand' => ref('app.command_handler.foo'),
297
- 'App\BarCommand' => ref('app.command_handler.bar'),
+ // In versions earlier to Symfony 5.1 the service() function was called ref()
+ 'App\FooCommand' => service('app.command_handler.foo'),
298
+ 'App\BarCommand' => service('app.command_handler.bar'),
299
// if the element has no key, the ID of the original service is used
- ref('app.command_handler.baz'),
300
+ service('app.command_handler.baz'),
301
])]);
302
};
303
0 commit comments