Skip to content

[DependencyInjection] Docs for method autowiring #7041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Fix comments
  • Loading branch information
dunglas committed Oct 8, 2016
commit aec785384f80438e970c27db9848e0c036e5ca2f
5 changes: 2 additions & 3 deletions components/dependency_injection/autowiring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ By default, the autowiring subsystem only injects dependencies in the constructo
the service. Constructor injection should always be preferred; however, it is sometimes
convenient to inject dependencies through methods (usually a setter method).

.. versionadded:: 2.8
.. versionadded:: 3.2
Method autowiring was added in Symfony 3.2

The ``*`` character can be used to ask the autowiring subsystem to inject dependencies
Expand Down Expand Up @@ -437,7 +437,7 @@ both in the constructor and in setter methods (starting with ``set``).

$container->setDefinition('foo', $fooDefinition);

Alternatively, the list of method to use for dependency injection can be configured explicitly:
Alternatively, the list of methods to use for dependency injection can be configured explicitly:

.. configuration-block::

Expand Down Expand Up @@ -466,7 +466,6 @@ Alternatively, the list of method to use for dependency injection can be configu

.. code-block:: php

use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Definition;

// ...
Expand Down