File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -246,8 +246,9 @@ Defining a Service Locator
246
246
--------------------------
247
247
248
248
To manually define a service locator, create a new service definition and add
249
- the ``container.service_locator `` tag to it. Use its ``arguments `` option to
250
- include as many services as needed in it.
249
+ the ``container.service_locator `` tag to it. Use the first argument of the
250
+ service definition to pass a collection of services to the service locator. If
251
+ there is no id specified for the service it will inherit its external id.
251
252
252
253
.. configuration-block ::
253
254
@@ -314,6 +315,10 @@ include as many services as needed in it.
314
315
previous Symfony versions you always needed to add the
315
316
``container.service_locator `` tag explicitly.
316
317
318
+ .. versionadded :: 4.2
319
+ The ability to add services without specifying an id was introduced in
320
+ Symfony 4.2.
321
+
317
322
.. note ::
318
323
319
324
The services defined in the service locator argument must include keys,
You can’t perform that action at this time.
0 commit comments