* @param \Drupal\migrate\Plugin\MigrationInterface $migration
* The migration to run.
* @param \Drupal\migrate\MigrateMessageInterface $message
- * The message to record.
+ * The migrate message service.
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
*
$multiple = $plugin->multiple();
}
}
- // No plugins or no value means do not set.
- if ($plugins && !is_null($value)) {
- $row->setDestinationProperty($destination, $value);
+ // Ensure all values, including nulls, are migrated.
+ if ($plugins) {
+ if (isset($value)) {
+ $row->setDestinationProperty($destination, $value);
+ }
+ else {
+ $row->setEmptyDestinationProperty($destination);
+ }
}
// Reset the value.
$value = NULL;
// @TODO: explore resetting the container.
+ // Run garbage collector to further reduce memory.
+ gc_collect_cycles();
+
return memory_get_usage();
}