Created
March 29, 2019 20:53
-
-
Save chriscalip/9a6f2040a8bedb1192a3ba6ac739240a to your computer and use it in GitHub Desktop.
Execute a drupal 8 migration via REPL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$m = \Drupal::service('plugin.manager.migration'); | |
$mi = $m->createInstance('migration_id'); | |
$source = $mi->getSourceConfiguration(); | |
$source['urls'][0] = 'temporary://file.json' | |
$source['data_fetcher_plugin'] = 'file'; | |
$mi->set('source', $source); | |
$exe = new \Drupal\migrate\MigrateExecutable($mi); | |
$mi->setStatus(\Drupal\migrate\Plugin\MigrationInterface::STATUS_IDLE); | |
$result = $exe->import(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment