Commit 370ccd7b authored by omkar podey's avatar omkar podey
Browse files

Issue #3277598: Check Compatibility with latest Paragraphs module release.

parent 62365bc2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -12,12 +12,15 @@
        "source": "https://git.drupalcode.org/project/paragraphs_migration"
    },
    "require": {
        "drupal/paragraphs": "1.12",
        "drupal/paragraphs": "^1.12",
        "drupal/smart_sql_idmap": "^1.1@beta"
    },
    "patches": {
      "drupal/core": {
        "Issue #3218294: Allow altering field value query performed by FieldableEntity": "https://www.drupal.org/files/issues/2021-06-10/core-allow_altering_migrate_field_value_query-3218294-2.patch"
      },
      "drupal/entity_reference_revisions": {
        "Issue #3218312: Provide an option to skip (opt-out) forcibly created new revision of the referenced entity (so that migrations won't lead to unnecessary saved revisions)": "https://www.drupal.org/files/issues/2021-06-10/entity_reference_revisions-opt_out_new_revision_save-3218312-2.patch"
      }
    }
}
+10 −0
Original line number Diff line number Diff line
@@ -39,6 +39,16 @@ abstract class ParagraphsFieldPluginBase extends FieldPluginBase {
   *   Array of the required migrations.
   */
  protected function getParentBasedMigrationDependencies(MigrationInterface $migration, string $field_name) {
    // Paragraphs provided migrations aren't dropped yet, their derivers are
    // invoked. And this method won't find either a source nor a destination
    // entity type ID, and would throw a LogicException.
    // But since we will drop them in our hook_migration_plugins_alter()
    // implementations, it is safe to return an empty array in every case when
    // the provider of the actual migration is 'paragraphs'.
    // See \Drupal\migrate\Plugin\MigrationPluginManager::getDiscovery().
    if ($migration->getPluginDefinition()['provider'] === 'paragraphs') {
      return [];
    }
    // Add the respective paragraphs or field collection migration dependency.
    $required_migrations = [];
    $destination_plugin = $migration->getDestinationPlugin();