From 3416efa646b1179d7bfe009c235f6e3a40497200 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Tue, 14 Jan 2020 14:09:45 +0000 Subject: [PATCH] Issue #3101818 by eiriksm, ravi.shankar, longwave: Allow other loggers than core loggers to FieldDiscovery.php (cherry picked from commit 0a7c6dc9cdbdd34b034f55c1ede5a196475c14dc) --- core/modules/migrate_drupal/src/FieldDiscovery.php | 8 ++++---- .../field_discovery_test/src/FieldDiscoveryTestClass.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/modules/migrate_drupal/src/FieldDiscovery.php b/core/modules/migrate_drupal/src/FieldDiscovery.php index 6f6fdba45d69..a15a83b0cf0b 100644 --- a/core/modules/migrate_drupal/src/FieldDiscovery.php +++ b/core/modules/migrate_drupal/src/FieldDiscovery.php @@ -3,13 +3,13 @@ namespace Drupal\migrate_drupal; use Drupal\Component\Plugin\Exception\PluginNotFoundException; -use Drupal\Core\Logger\LoggerChannelInterface; use Drupal\migrate\Exception\RequirementsException; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Plugin\MigrationPluginManagerInterface; use Drupal\migrate\Plugin\RequirementsInterface; use Drupal\migrate_drupal\Plugin\MigrateCckFieldInterface; use Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface; +use Psr\Log\LoggerInterface; /** * Provides field discovery for Drupal 6 & 7 migrations. @@ -47,7 +47,7 @@ class FieldDiscovery implements FieldDiscoveryInterface { /** * The logger channel service. * - * @var \Drupal\Core\Logger\LoggerChannelInterface + * @var \Psr\Log\LoggerInterface */ protected $logger; @@ -104,10 +104,10 @@ class FieldDiscovery implements FieldDiscoveryInterface { * The field plugin manager. * @param \Drupal\migrate\Plugin\MigrationPluginManagerInterface $migration_plugin_manager * The migration plugin manager. - * @param \Drupal\Core\Logger\LoggerChannelInterface $logger + * @param \Psr\Log\LoggerInterface $logger * The logger channel service. */ - public function __construct(MigrateFieldPluginManagerInterface $field_plugin_manager, MigrationPluginManagerInterface $migration_plugin_manager, LoggerChannelInterface $logger) { + public function __construct(MigrateFieldPluginManagerInterface $field_plugin_manager, MigrationPluginManagerInterface $migration_plugin_manager, LoggerInterface $logger) { $this->fieldPluginManager = $field_plugin_manager; $this->migrationPluginManager = $migration_plugin_manager; $this->logger = $logger; diff --git a/core/modules/migrate_drupal/tests/modules/field_discovery_test/src/FieldDiscoveryTestClass.php b/core/modules/migrate_drupal/tests/modules/field_discovery_test/src/FieldDiscoveryTestClass.php index 708f1d199062..5b08aed9e06b 100644 --- a/core/modules/migrate_drupal/tests/modules/field_discovery_test/src/FieldDiscoveryTestClass.php +++ b/core/modules/migrate_drupal/tests/modules/field_discovery_test/src/FieldDiscoveryTestClass.php @@ -2,11 +2,11 @@ namespace Drupal\field_discovery_test; -use Drupal\Core\Logger\LoggerChannelInterface; use Drupal\migrate\Plugin\MigrationPluginManagerInterface; use Drupal\migrate_drupal\FieldDiscovery; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface; +use Psr\Log\LoggerInterface; /** * A test class to expose protected methods. @@ -27,13 +27,13 @@ class FieldDiscoveryTestClass extends FieldDiscovery { * The field plugin manager. * @param \Drupal\migrate\Plugin\MigrationPluginManagerInterface $migration_plugin_manager * The migration plugin manager. - * @param \Drupal\Core\Logger\LoggerChannelInterface $logger + * @param \Psr\Log\LoggerInterface $logger * The logger. * @param array $test_data * An array of test data, keyed by method name, for overridden methods to * return for the purposes of testing other methods. */ - public function __construct(MigrateFieldPluginManagerInterface $field_plugin_manager, MigrationPluginManagerInterface $migration_plugin_manager, LoggerChannelInterface $logger, array $test_data = []) { + public function __construct(MigrateFieldPluginManagerInterface $field_plugin_manager, MigrationPluginManagerInterface $migration_plugin_manager, LoggerInterface $logger, array $test_data = []) { parent::__construct($field_plugin_manager, $migration_plugin_manager, $logger); $this->testData = $test_data; } -- GitLab