diff --git a/src/Commands/pm/PmCommands.php b/src/Commands/pm/PmCommands.php index a00af96b83..87ea241199 100644 --- a/src/Commands/pm/PmCommands.php +++ b/src/Commands/pm/PmCommands.php @@ -7,6 +7,7 @@ use Consolidation\AnnotatedCommand\CommandData; use Consolidation\AnnotatedCommand\Hooks\HookManager; use Consolidation\OutputFormatters\StructuredData\RowsOfFields; +use Drupal; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Extension\Extension; use Drupal\Core\Extension\MissingDependencyException; @@ -407,7 +408,8 @@ protected function getModuleLinks(Extension $module): array } // Generate link for module's permissions page. - if ($module->status && $this->getPermissionHandler()->moduleProvidesPermissions($module->getName())) { + // Avoid DI for PermissionHandler until we understand better at https://github.com/drush-ops/drush/issues/6154. + if ($module->status && Drupal::service(PermissionHandlerInterface::class)->moduleProvidesPermissions($module->getName())) { $links[] = Link::fromTextAndUrl(dt('Permissions'), Url::fromRoute('user.admin_permissions.module', ['modules' => $module->getName()])); }