Change record status: 
Project: 
Introduced in branch: 
9.4.x
Introduced in version: 
9.4
Description: 

Providing invalid configuration to process plugins should result in an InvalidArgumentException in the constructor. Currently, some process plugin throw a MigrateException in the transform method.

Before

  • ProcessField, Explode, and FormatDate throw a MigrateException in the transform method when the configuration is invalid.
  • MachineName throws an MigrateException in the constructor.
  • MakeUniqueBase and StaticMap throw MigrateExceptions in the transform method when configuration is invalid.

After

  • ProcessField, Explode, and FormatDate throw an InvalidArgumentException in the constructor.
  • MachineName throws an InvalidArgumentException in the constructor.
  • MakeUniqueBase and StaticMap - throwing an MigrateException in the transform method is deprecated. An InvalidArgumentException will be thrown in the constructor starting in Drupal 10.0.0.

Previously, both exceptions were caught and logged in similar ways in MigrateExecutable, so when executing migrations in normal migrate workflows, no action should be required. Developers running a custom version of MigrateExecutable, or using these plugins in other custom workflows may need to be aware and catch the new exception correctly.

Impacts: 
Module developers