We thought it'll be needed for files. Turns out the process system is powerful enough. I am recommending removing it.

CommentFileSizeAuthor
#4 2324353_4.patch9.96 KBchx
#2 2324353_2.patch8.65 KBchx
nomedfi.patch3.05 KBchx

Comments

benjy’s picture

Assigned: benjy » Unassigned
Status: Needs review » Reviewed & tested by the community

Looks good to me.

chx’s picture

StatusFileSize
new8.65 KB

I found more dead code. Doesn't need review, it's just the same dead.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 2324353_2.patch, failed testing.

chx’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new9.96 KB

Even more dead.

benjy’s picture

+++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php
@@ -76,27 +73,6 @@ public static function create(ContainerInterface $container, array $configuratio
-    if ($bundle_key = $this->getKey('bundle')) {
-      $bundle = $row->getDestinationProperty($bundle_key);
-    }
-    else {
-      $bundle = $this->storage->getEntityTypeId();
-    }
-    // Some migrations save additional data of an existing entity and only
-    // provide the reference to the entity, in those cases, we can not run the
-    // processing below. Migrations that need that need to provide the bundle.
-    if ($bundle) {
-      $field_definitions = $this->entityManager->getFieldDefinitions($this->storage->getEntityTypeId(), $bundle);
-      foreach ($field_definitions as $field_name => $field_definition) {
-        $field_type = $field_definition->getType();
-        if ($this->migrateEntityFieldPluginManager->getDefinition($field_type, FALSE)) {
-          $destination_value = $this->migrateEntityFieldPluginManager->createInstance($field_type)->import($field_definition, $row->getDestinationProperty($field_name));
-          // @TODO: check for NULL return? Add an unset to $row? Maybe needed in
-          // exception handling? Propagate exception?
-          $row->setDestinationProperty($field_name, $destination_value);
-        }
-      }
-    }

Wow, this is great!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Yay less code!

Committed and pushed to 8.x. Thanks!

  • webchick committed 0c8bbf1 on 8.0.x
    Issue #2324353 by chx: Remove MigrateEntityDestinationFieldInterface.
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.