Skip to content
Snippets Groups Projects
Commit 52e18c90 authored by James Silver's avatar James Silver Committed by Tobias Bähr
Browse files

Issue #3293638: Fixes for latest version of migrate module

parent 5c128a55
No related branches found
No related tags found
1 merge request!3Issue #3293638: Fixes for latest version of migrate module
Pipeline #277164 passed with warnings
......@@ -34,5 +34,11 @@ class EntityImportPlusEventSubscriber implements EventSubscriberInterface {
'plugin' => 'entity:node'
]);
}
// The str_replace plugin throws an exception if initialized with invalid
// configuration.
if ($event->getPluginId() === 'entity_import_plus_str_replace') {
$event->setConfigurationValue('search', []);
$event->setConfigurationValue('replace', []);
}
}
}
......@@ -32,16 +32,6 @@ class EntityImportPlusEntityGenerate extends EntityGenerate implements EntityImp
use EntityImportProcessTrait;
/**
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* @var \Drupal\Core\Entity\EntityFieldManagerInterface
*/
protected $entityFieldManager;
/**
* @var \Drupal\Core\Entity\EntityTypeBundleInfoInterface
*/
......@@ -79,7 +69,7 @@ class EntityImportPlusEntityGenerate extends EntityGenerate implements EntityImp
$pluginId,
$pluginDefinition,
MigrationInterface $migration = NULL
) {
): self {
return new static(
$configuration,
$pluginId,
......
......@@ -30,16 +30,6 @@ class EntityImportPlusEntityLookup extends EntityLookup implements EntityImportP
use EntityImportProcessTrait;
/**
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* @var \Drupal\Core\Entity\EntityFieldManagerInterface
*/
protected $entityFieldManager;
/**
* @var \Drupal\Core\Entity\EntityTypeBundleInfoInterface
*/
......
......@@ -59,10 +59,11 @@ class EntityImportProcessManager implements EntityImportProcessManagerInterface
new EntityImportMigrationStubEvent($plugin_id, []),
EntityImportEvents::ENTITY_IMPORT_PREPARE_MIGRATION_STUB
);
$configuration += $prepare_event->getConfiguration();
$migration = isset($migration)
? $migration
: $this->migrationManager->createStubMigration($prepare_event->getConfiguration());
: $this->migrationManager->createStubMigration($configuration);
return $this
->migratePluginManager
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment