Skip to content

Commit

Permalink
Don't inject a logger and use Drush's.
Browse files Browse the repository at this point in the history
  • Loading branch information
jordandukart committed Dec 13, 2024
1 parent f00cb2d commit b67f66a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
services:
logger.channel.dgi_migrate_regenerate_pathauto_aliases:
parent: logger.channel_base
arguments: ['dgi_migrate_regenerate_pathauto_aliases']
dgi_migrate_regenerate_pathauto_aliases:
class: \Drupal\dgi_migrate_regenerate_pathauto_aliases\Commands\Pathauto
arguments:
- '@pathauto.generator'
- '@entity_type.manager'
- '@entity_type.bundle.info'
- '@logger.channel.dgi_migrate_regenerate_pathauto_aliases'
tags:
- name: drush.command
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Drupal\pathauto\PathautoGeneratorInterface;
use Drupal\pathauto\PathautoState;
use Drush\Commands\DrushCommands;
use Psr\Log\LoggerInterface;

/**
* Re-generates missing pathauto aliases.
Expand Down Expand Up @@ -49,14 +48,11 @@ class Pathauto extends DrushCommands {
* The entity type manager service.
* @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info
* The entity type bundle info service.
* @param \Psr\Log\LoggerInterface $logger
* A logger to which to log.
*/
public function __construct(PathautoGeneratorInterface $pathauto_generator, EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, LoggerInterface $logger) {
public function __construct(PathautoGeneratorInterface $pathauto_generator, EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info) {
$this->pathautoGenerator = $pathauto_generator;
$this->entityTypeManager = $entity_type_manager;
$this->entityTypeBundleInfo = $entity_type_bundle_info;
$this->logger = $logger;
}

/**
Expand Down

0 comments on commit b67f66a

Please sign in to comment.