From c30b0c1595eec069a8cd07f86b21423d8cfcd54f Mon Sep 17 00:00:00 2001 From: Moshe Weitzman Date: Thu, 30 May 2024 07:55:22 -0400 Subject: [PATCH] Fix link in dic --- docs/dependency-injection.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/dependency-injection.md b/docs/dependency-injection.md index e6d7e588a1..7b5b614742 100644 --- a/docs/dependency-injection.md +++ b/docs/dependency-injection.md @@ -11,7 +11,8 @@ Autowire ------------------ :octicons-tag-24: 12.5+ -Command files may inject Drush and Drupal services by adding the [AutowireTrait](https://github.com/drush-ops/drush/blob/12.x/src/Commands/AutowireTrait.php) to the class (example: [PmCommands](https://github.com/drush-ops/drush/blob/12.x/src/Commands/pm/PmCommands.php)). This enables your [Constructor parameter type hints determine the the injected service](https://www.drupal.org/node/3396179). When a type hint is insufficient, an [#[Autowire] Attribute](https://www.drupal.org/node/3396179) on the constructor property (with _service:_ named argument) directs AutoWireTrait to the right service (example: [LoginCommands](https://github.com/drush-ops/drush/blob/12.x/src/Commands/core/LoginCommands.php)). +Command files may inject Drush and Drupal services by adding the [AutowireTrait](https://github.com/drush-ops/drush/blob/12.x/src/Commands/AutowireTrait.php) to the class (example: [MaintCommands](https://github.com/drush-ops/drush/blob/12.x/src/Commands/core/MaintCommands.php)). This enables your [Constructor parameter type hints determine the the injected service](https://www.drupal.org/node/3396179). When a type hint is insufficient, an [#[Autowire] Attribute](https://www.drupal.org/node/3396179) on the constructor property (with +_service:_ named argument) directs AutoWireTrait to the right service. If your command is not found by Drush, add the `-vvv` option for debug info about any service instantiation errors. If Autowire is still insufficient, a commandfile may implement its own `create()` method (see below).