Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298914

MigrateDestinationInterface::import() should document that it can throw a MigrateException

$
0
0

Problem/Motivation

Looking at the code in MigrateExecutable, it looks like MigrateDestinationInterface::import() can throw a MigrateException.

Furthermore, while simply throwing a MigrateException causes the row to be considered to have failed, MigrateException's constructor allows a MigrateIdMapInterface status constant to be passed, so a destination plugin can do this to skip a row:

      throw new MigrateException("My message.", 0, NULL, MigrationInterface::MESSAGE_ERROR, MigrateIdMapInterface::STATUS_IGNORED);

This should be documented in MigrateDestinationInterface::import().

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 298914

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>