Skip to content

Commit 2a27479

Browse files
authored
Fixes
1 parent 2bc467f commit 2a27479

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

components/dependency_injection/autowiring.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ and a Twitter client using it:
309309
rot13_transformer:
310310
class: Acme\Rot13Transformer
311311
312-
Acme\TransformerInterface: @rot13_transformer
312+
          Acme\TransformerInterface: "@rot13_transformer"
313313

314-
twitter_client:
314+
          twitter_client:
315315
class: Acme\TwitterClient
316316
autowire: true
317317

@@ -332,7 +332,8 @@ and a Twitter client using it:
332332
333333
<services>
334334
<service id="rot13_transformer" class="Acme\Rot13Transformer" />
335-
<service id="Acme\TransformerInterface" alias="rot13_transformer" />
335+
 
336+
              <service id="Acme\TransformerInterface" alias="rot13_transformer" />
336337

337338
<service id="twitter_client" class="Acme\TwitterClient" autowire="true" />
338339

@@ -384,8 +385,8 @@ to use which leads to errors like this:
384385
Fortunately, the FQCN alias is here to specify which implementation
385386
to use by default.
386387

387-
.. versionadded:: 3.2
388-
Using FQCN aliases to fix autowiring ambiguities is allowed since Symfony
388+
.. versionadded:: 3.3
389+
  Using FQCN aliases to fix autowiring ambiguities is allowed since Symfony
389390
3.3. Prior to version 3.3, you needed to use the ``autowiring_types`` key.
390391

391392
Thanks to this alias, the ``rot13_transformer`` service is automatically injected

0 commit comments

Comments
 (0)