Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions service_container/alias_private.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ The following example shows how to inject an anonymous service into another serv

.. code-block:: yaml

# app/config/services.yaml
# config/services.yaml
services:
App\Foo:
arguments:
Expand All @@ -177,7 +177,7 @@ The following example shows how to inject an anonymous service into another serv

.. code-block:: xml

<!-- app/config/services.xml -->
<!-- config/services.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -199,14 +199,14 @@ Using an anonymous service as a factory looks like this:

.. code-block:: yaml

# app/config/services.yaml
# config/services.yaml
services:
App\Foo:
factory: [ !service { class: App\FooFactory }, 'constructFoo' ]

.. code-block:: xml

<!-- app/config/services.xml -->
<!-- config/services.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down