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
10 changes: 5 additions & 5 deletions components/dependency_injection/autowiring.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. index::
single: DependencyInjection; Autowiring

Defining Services Dependencies Automatically
============================================
Defining Services Dependencies Automatically (Autowiring)
=========================================================

.. versionadded:: 2.8
Support for autowiring services was introduced in Symfony 2.8.
Expand Down Expand Up @@ -76,7 +76,7 @@ service is marked as autowired:
<services>
<service id="twitter_client" class="AppBundle\TwitterClient" autowire="true" />
</services>
</services>
</container>

.. code-block:: php

Expand Down Expand Up @@ -218,7 +218,7 @@ subsystem isn't able to find itself the interface implementation to register::
<service id="rot13_transformer" class="AppBundle\Rot13Transformer" />
<service id="twitter_client" class="AppBundle\TwitterClient" autowire="true" />
</services>
</services>
</container>

.. code-block:: php

Expand Down Expand Up @@ -356,7 +356,7 @@ and a Twitter client using it::
<argument type="service" id="uppercase_rot13_transformer" />
</service>
</services>
</services>
</container>

.. code-block:: php

Expand Down