1

I've been migrating a site from Drupal 7 to Drupal 8. The site was 8.4 when I ran the migrations. I've since updated the site to Drupal 8.5. Now, when I type drush migration-status or any migration-related command, I get the following error:

[error]  The file_entity plugin must define the source_module property.

1 Answer 1

0

Ok answering this myself. I keep forgetting that Drupal often introduces breaking changes and treats comments as code. It looks like the annotation changed in 8.5

What was in 8.4:

/**
 * Drupal 7 file_entity source from database.
 *
 * @MigrateSource(
 *   id = "file_entity",
 *   source_provider = "file"
 * )
 */

in 8.5 should now be:

/**
 * Drupal 7 file_entity source from database.
 *
 * @MigrateSource(
 *   id = "file_entity",
 *   source_module = "file",
 * )
 */
4
  • Would a slight change in annotation really effect the functionality of Drush? Besides the references page and the given examples talk about 7, but you say you have 8.
    – AltaGrade
    Apr 4, 2018 at 16:01
  • @AltaGrade Not drush as a whole, but running any migration-related drush command threw an error. I fixed one annotation, and then drush migrations worked again. Apr 4, 2018 at 18:29
  • Really strange as annotations are not part of executed code, they are just notes. So I do believe something else is going on here.
    – AltaGrade
    Apr 4, 2018 at 18:53
  • @AltaGrade If you find another way to resolve the issue, please let me know. drupal.org/docs/8/api/plugin-api/annotations-based-plugins Apr 5, 2018 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.