Skip to content

Commit e8b0d40

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Fix docs referencing an incorrect PHP function
2 parents 6276bc7 + 185d4ca commit e8b0d40

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

service_container/service_subscribers_locators.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,11 @@ argument of type ``service_locator``:
293293
294294
$services->set(CommandBus::class)
295295
->args([service_locator([
296-
'App\FooCommand' => ref('app.command_handler.foo'),
297-
'App\BarCommand' => ref('app.command_handler.bar'),
296+
// In versions earlier to Symfony 5.1 the service() function was called ref()
297+
'App\FooCommand' => service('app.command_handler.foo'),
298+
'App\BarCommand' => service('app.command_handler.bar'),
298299
// if the element has no key, the ID of the original service is used
299-
ref('app.command_handler.baz'),
300+
service('app.command_handler.baz'),
300301
])]);
301302
};
302303

0 commit comments

Comments
 (0)