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

Use constants to distinguish d6/d7 table names in source plugins

$
0
0

Problem/Motivation

In one of the recent i18n issues we started defining constants for the Drupal 6 and Drupal 7 for source plugins that share the same code for both versions. One example is 'block' for Drupal 7 and 'blocks' for Drupal 6. Let's complete that for all source plugins.

I grepped for all usages of ModuleSchemaVersion in source plugins and selected only those that need to have unique table names for d6 and d7.

These are the source plugins that need to be changed.

  • block/src/Plugin/migrate/source/Block.php
  • user/src/Plugin/migrate/source/ProfileField.php This can't be done now becuase it would require deprecating a migration which we can't do yet, #3039240: Create a way to declare a plugin as deprecated. See #19. At the 2021-12-02 Migrate Meeting, the sentiment was that we should forego refactoring ProfileField because it would not be worth the effort. Other issues should be prioritized.

And if one wants an example look at d6/BoxTranslation and d7/BlockCustomTranslation.

Steps to reproduce

Proposed resolution

Change block/src/Plugin/migrate/source/Block.php

Remaining tasks

Review
Commit

User interface changes

N/A

API changes

\Drupal\block\Plugin\migrate\source\Block deprecated

Data model changes

N/A

Release notes snippet

N/A


Viewing all articles
Browse latest Browse all 295840

Trending Articles



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