Commit 3416efa6 authored by alexpott's avatar alexpott

Issue #3101818 by eiriksm, ravi.shankar, longwave: Allow other loggers than...

Issue #3101818 by eiriksm, ravi.shankar, longwave: Allow other loggers than core loggers to FieldDiscovery.php

(cherry picked from commit 0a7c6dc9)
parent a31a15b4
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
namespace Drupal\migrate_drupal; namespace Drupal\migrate_drupal;
use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\Component\Plugin\Exception\PluginNotFoundException;
use Drupal\Core\Logger\LoggerChannelInterface;
use Drupal\migrate\Exception\RequirementsException; use Drupal\migrate\Exception\RequirementsException;
use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Plugin\MigrationPluginManagerInterface; use Drupal\migrate\Plugin\MigrationPluginManagerInterface;
use Drupal\migrate\Plugin\RequirementsInterface; use Drupal\migrate\Plugin\RequirementsInterface;
use Drupal\migrate_drupal\Plugin\MigrateCckFieldInterface; use Drupal\migrate_drupal\Plugin\MigrateCckFieldInterface;
use Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface; use Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface;
use Psr\Log\LoggerInterface;
/** /**
* Provides field discovery for Drupal 6 & 7 migrations. * Provides field discovery for Drupal 6 & 7 migrations.
...@@ -47,7 +47,7 @@ class FieldDiscovery implements FieldDiscoveryInterface { ...@@ -47,7 +47,7 @@ class FieldDiscovery implements FieldDiscoveryInterface {
/** /**
* The logger channel service. * The logger channel service.
* *
* @var \Drupal\Core\Logger\LoggerChannelInterface * @var \Psr\Log\LoggerInterface
*/ */
protected $logger; protected $logger;
...@@ -104,10 +104,10 @@ class FieldDiscovery implements FieldDiscoveryInterface { ...@@ -104,10 +104,10 @@ class FieldDiscovery implements FieldDiscoveryInterface {
* The field plugin manager. * The field plugin manager.
* @param \Drupal\migrate\Plugin\MigrationPluginManagerInterface $migration_plugin_manager * @param \Drupal\migrate\Plugin\MigrationPluginManagerInterface $migration_plugin_manager
* The migration plugin manager. * The migration plugin manager.
* @param \Drupal\Core\Logger\LoggerChannelInterface $logger * @param \Psr\Log\LoggerInterface $logger
* The logger channel service. * 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->fieldPluginManager = $field_plugin_manager;
$this->migrationPluginManager = $migration_plugin_manager; $this->migrationPluginManager = $migration_plugin_manager;
$this->logger = $logger; $this->logger = $logger;
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
namespace Drupal\field_discovery_test; namespace Drupal\field_discovery_test;
use Drupal\Core\Logger\LoggerChannelInterface;
use Drupal\migrate\Plugin\MigrationPluginManagerInterface; use Drupal\migrate\Plugin\MigrationPluginManagerInterface;
use Drupal\migrate_drupal\FieldDiscovery; use Drupal\migrate_drupal\FieldDiscovery;
use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface; use Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface;
use Psr\Log\LoggerInterface;
/** /**
* A test class to expose protected methods. * A test class to expose protected methods.
...@@ -27,13 +27,13 @@ class FieldDiscoveryTestClass extends FieldDiscovery { ...@@ -27,13 +27,13 @@ class FieldDiscoveryTestClass extends FieldDiscovery {
* The field plugin manager. * The field plugin manager.
* @param \Drupal\migrate\Plugin\MigrationPluginManagerInterface $migration_plugin_manager * @param \Drupal\migrate\Plugin\MigrationPluginManagerInterface $migration_plugin_manager
* The migration plugin manager. * The migration plugin manager.
* @param \Drupal\Core\Logger\LoggerChannelInterface $logger * @param \Psr\Log\LoggerInterface $logger
* The logger. * The logger.
* @param array $test_data * @param array $test_data
* An array of test data, keyed by method name, for overridden methods to * An array of test data, keyed by method name, for overridden methods to
* return for the purposes of testing other methods. * 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); parent::__construct($field_plugin_manager, $migration_plugin_manager, $logger);
$this->testData = $test_data; $this->testData = $test_data;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment