Issue #3017119 by phenaproxima: SourcePluginBase::next() calls Row constructor incorrectly

8.7.x
Alex Pott 2018-11-30 09:48:15 +00:00
parent b33232b7d2
commit 30cfcd03d0
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
2 changed files with 6 additions and 1 deletions

View File

@ -353,7 +353,7 @@ abstract class SourcePluginBase extends PluginBase implements MigrateSourceInter
$row_data = $this->getIterator()->current() + $this->configuration;
$this->fetchNextRow();
$row = new Row($row_data, $this->migration->getSourcePlugin()->getIds(), $this->migration->getDestinationIds());
$row = new Row($row_data, $this->getIds());
// Populate the source key for this row.
$this->currentSourceIds = $row->getSourceIdValues();

View File

@ -45,6 +45,11 @@ class MigrateEmbeddedDataTest extends KernelTestBase {
$results = [];
/** @var \Drupal\migrate\Row $row */
foreach ($source as $row) {
// The plugin should not mark any rows as stubs. We need to use
// assertSame() here because assertFalse() will pass falsy values (e.g.,
// empty arrays).
$this->assertSame(FALSE, $row->isStub());
$data_row = $row->getSource();
// The "data" row returned by getSource() also includes all source
// configuration - we remove it so we see only the data itself.