File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -556,6 +556,27 @@ 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 autowiring aliases by running the ``debug:autowiring `` command::
560
+
561
+ .. code-block :: terminal
562
+
563
+ $ php bin/console debug:autowiring LoggerInterface
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 LoggerInterface)
570
+
571
+ Describes a logger instance.
572
+ Psr\Log\LoggerInterface - alias:monolog.logger
573
+ Psr\Log\LoggerInterface $assetMapperLogger - target:asset_mapperLogger - alias:monolog.logger.asset_mapper
574
+ Psr\Log\LoggerInterface $cacheLogger - alias:monolog.logger.cache
575
+ Psr\Log\LoggerInterface $httpClientLogger - target:http_clientLogger - alias:monolog.logger.http_client
576
+ Psr\Log\LoggerInterface $mailerLogger - alias:monolog.logger.mailer
577
+
578
+ [...]
579
+
559
580
Suppose you want to inject the ``App\Util\UppercaseTransformer `` service. You would use
560
581
the ``#[Target] `` attribute by passing the name of the ``$shoutyTransformer `` argument::
561
582
You can’t perform that action at this time.
0 commit comments