Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291720

Implement Entity::fields() for migration destinations

$
0
0

Went to implement #2630718: Implement drush migrate-fields-destination and got no output, because:

  public function fields(MigrationInterface $migration = NULL) {
    // TODO: Implement fields() method.
  }

D'oh!

Some introspection necessary here. Ideally, if we followed the D7 migration model, the destination instance in a migration would have a specific bundle assigned, so we would be able to retrieve bundle-specific fields here. That's not true in D8, the bundle is assumed to be pulled per-row from the source data so can't be statically determined. That's... unfortunate, and would seem to require an architectural change (I would love if destinations could be configured like entity:node:article). But at least for now we can pull the base properties here.


Viewing all articles
Browse latest Browse all 291720

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>