File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -556,6 +556,21 @@ decorrelated of any implementation name (like shown in the example above).
556
556
The ``#[Target] `` attribute only accepts the name of the argument used in the named
557
557
alias, it **does not ** accept service ids or service aliases.
558
558
559
+ You can get a list of named autowirable alias by running the ``debug:autowiring `` command::
560
+
561
+ .. code-block :: terminal
562
+
563
+ $ bin/console debug:autowiring TransformerInterface
564
+
565
+ Autowirable Types
566
+ =================
567
+
568
+ The following classes & interfaces can be used as type-hints when autowiring:
569
+ (only showing classes/interfaces matching TransformerInterface)
570
+
571
+ App\Util\TransformerInterface - alias:App\Util\Rot13Transformer
572
+ App\Util\TransformerInterface $shoutyTransformer - alias:App\Util\UppercaseTransformer
573
+
559
574
Suppose you want to inject the ``App\Util\UppercaseTransformer `` service. You would use
560
575
the ``#[Target] `` attribute by passing the name of the ``$shoutyTransformer `` argument::
561
576
You can’t perform that action at this time.
0 commit comments