I am running into this issue:

codio@total-patrol:~/workspace/motionsplan.dk/web$ drush migrate-status                            
PHP Fatal error:  Unsupported operand types in /home/codio/workspace/motionsplan.dk/web/core/module
s/migrate/src/Plugin/Migration.php on line 665                                                     
Drush command terminated abnormally due to an unrecoverable error.                      [error]    
Error: Unsupported operand types in                                                                
/home/codio/workspace/motionsplan.dk/web/core/modules/migrate/src/Plugin/Migration.php,            
line 665 

I am using these version:

"require": {
  "drupal/migrate": "8.1.*",
  "drupal/migrate_plus": "8.2.*",
  "drupal/migrate_tools": "8.2.*",
  "drupal/migrate_source_csv": "8.2.*",
}
   "patches": {
      "drupal/migrate_tools": {
        "Issue #2697923 Make migration UI work with 8.1.x": "https://www.drupal.org/files/issues/2697923-add-migration-ui-4.patch"
      }
  }

Comments

lsolesen created an issue. See original summary.

mikeryan’s picture

Title: Unsupported operand types in migrate/src/Plugin/Migration.php on line 665 » Empty migration_dependencies gives "Unsupported operand types"
Project: Migrate Tools » Drupal core
Version: 8.x-2.x-dev » 8.1.x-dev
Component: Drush commands » migration system

This happens if you omit migrate_dependencies from your migration .yml file - you can prevent this with

migration_dependencies: {}

This is at least the third or fourth person I know of (including myself) that's hit this, I think it's worth defending against it in getMigrationDependencies().

mikeryan’s picture

StatusFileSize
new583 bytes
mikeryan’s picture

Status: Active » Needs review
pguillard’s picture

Status: Needs review » Reviewed & tested by the community

I would say RTBC, this patch prevents the error.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 3: empty-2717483-3.patch, failed testing.

guilopes’s picture

I confirmed this issue, I had the same here. The patch solve the issue here. Thanks @mikeryan

mpp’s picture

Encountered the same issue, the attached patch resolved it.

RTBC

mpp’s picture

Status: Needs work » Needs review

Seems like something went wrong in the test queue. Patch did PASS.

mpp’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

Let's at least add some unit test coverage of this.

pguillard’s picture

Status: Needs work » Needs review
StatusFileSize
new1.41 KB
new715 bytes

Something like this ?

killes@www.drop.org’s picture

I can confirm this patch works.

keopx’s picture

Status: Needs review » Reviewed & tested by the community

Works fine for me.

mikeryan’s picture

Issue tags: -Needs tests
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed f918de0 and pushed to 8.1.x and 8.2.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.