From 80e6c25fbec213ddaedcda25f6f4338c326222f1 Mon Sep 17 00:00:00 2001
From: Lucas D Hedding <lucashedding@1463982.no-reply.drupal.org>
Date: Fri, 16 Apr 2021 13:28:35 -0600
Subject: [PATCH] Fixes #259 by inverting the order of arguments to the event
 dispatcher

---
 migrate_plus.module | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migrate_plus.module b/migrate_plus.module
index 6cb976c4..d7aa25f1 100644
--- a/migrate_plus.module
+++ b/migrate_plus.module
@@ -83,5 +83,5 @@ function migrate_plus_migration_plugins_alter(array &$migrations) {
  * Implements hook_migrate_prepare_row().
  */
 function migrate_plus_migrate_prepare_row(Row $row, MigrateSourceInterface $source, MigrationInterface $migration) {
-  \Drupal::service('event_dispatcher')->dispatch(MigrateEvents::PREPARE_ROW, new MigratePrepareRowEvent($row, $source, $migration));
+  \Drupal::service('event_dispatcher')->dispatch(new MigratePrepareRowEvent($row, $source, $migration), MigrateEvents::PREPARE_ROW);
 }
-- 
GitLab