@@ -91,10 +91,11 @@ option to include as many services as needed to it and add the
91
91
92
92
app.command_handler_locator :
93
93
class : Symfony\Component\DependencyInjection\ServiceLocator
94
- arguments :
95
- AppBundle\FooCommand : ' @app.command_handler.foo'
96
- AppBundle\BarCommand : ' @app.command_handler.bar'
97
94
tags : ['container.service_locator']
95
+ arguments :
96
+ -
97
+ AppBundle\FooCommand : ' @app.command_handler.foo'
98
+ AppBundle\BarCommand : ' @app.command_handler.bar'
98
99
99
100
.. code-block :: xml
100
101
@@ -106,8 +107,10 @@ option to include as many services as needed to it and add the
106
107
<services >
107
108
108
109
<service id =" app.command_handler_locator" class =" Symfony\Component\DependencyInjection\ServiceLocator" >
109
- <argument key =" AppBundle\FooCommand" type =" service" id =" app.command_handler.foo" />
110
- <argument key =" AppBundle\BarCommand" type =" service" id =" app.command_handler.bar" />
110
+ <argument type =" collection" >
111
+ <argument key =" AppBundle\FooCommand" type =" service" id =" app.command_handler.foo" />
112
+ <argument key =" AppBundle\BarCommand" type =" service" id =" app.command_handler.bar" />
113
+ </argument >
111
114
<tag name =" container.service_locator" />
112
115
</service >
113
116
@@ -124,10 +127,10 @@ option to include as many services as needed to it and add the
124
127
$container
125
128
->register('app.command_handler_locator', ServiceLocator::class)
126
129
->addTag('container.service_locator')
127
- ->setArguments(array(
130
+ ->setArguments(array(array(
128
131
'AppBundle\FooCommand' => new Reference('app.command_handler.foo'),
129
132
'AppBundle\BarCommand' => new Reference('app.command_handler.bar'),
130
- ))
133
+ )))
131
134
;
132
135
133
136
.. note ::
0 commit comments