@@ -553,16 +553,16 @@ If the argument is named ``$shoutyTransformer``,
553553But, you can also manually wire any *other * service by specifying the argument
554554under the arguments key.
555555
556- Another possibility is to use the ``#[Target] `` attribute. By using this attribute
557- on the argument you want to autowire, you can define exactly which service to inject
558- by passing the name of the argument used in the named alias. Thanks to this , you're able
559- to have multiple services implementing the same interface and keep the argument name
560- decorrelated of any implementation name (like shown in the example above).
556+ Another option is to use the ``#[Target] `` attribute. By adding this attribute
557+ to the argument you want to autowire, you can specify which service to inject by
558+ passing the name of the argument used in the named alias. This way , you can have
559+ multiple services implementing the same interface and keep the argument name
560+ separate from any implementation name (like shown in the example above).
561561
562562.. warning ::
563563
564- The ``#[Target] `` attribute only accepts the name of the argument used in the named
565- alias, it **does not ** accept service ids or service aliases.
564+ The ``#[Target] `` attribute only accepts the name of the argument used in the
565+ named alias; it **does not ** accept service ids or service aliases.
566566
567567Suppose you want to inject the ``App\Util\UppercaseTransformer `` service. You would use
568568the ``#[Target] `` attribute by passing the name of the ``$shoutyTransformer `` argument::
@@ -584,8 +584,10 @@ the ``#[Target]`` attribute by passing the name of the ``$shoutyTransformer`` ar
584584 }
585585 }
586586
587- Since the ``#[Target] `` attribute normalizes the string passed to it to its camelCased form,
588- name variations such as ``shouty.transformer `` also work.
587+ .. tip ::
588+
589+ Since the ``#[Target] `` attribute normalizes the string passed to it to its
590+ camelCased form, name variations (e.g. ``shouty.transformer ``) also work.
589591
590592.. note ::
591593
0 commit comments