Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't inject a logger and use Drush's. #157

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading