Problem/Motivation

Its not supported to extend config schema via hook_config_schema_info_alter. Migrate Plus should move the "migration_group" property to a third party setting.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webflo created an issue. See original summary.

webflo’s picture

Issue summary: View changes
webflo’s picture

webflo’s picture

FileSize
763 bytes
mikeryan’s picture

Damn - I wish I had pushed harder to get groups into core for 8.0.0, the inability to modify the schema makes it hard to cleanly support them in contrib.

So, we need to do this via third party settings, which is not the best-documented D8 feature (this is the first I've heard of it). If I follow what I've read correctly, we need to add to migrate_plus.schema.yml something like

migrate.migration.*.third_party.migrate_plus:
  type: mapping
  label: 'Group'
  mapping:
    migration_group:
      type: string
      label: 'Group'

So, in a migration .yml file, we need to replace migration_group: example_group with... Something like this?

third_party:
  migrate_plus:
    migration_group: example_group
webflo’s picture

Thats correct. ConfigEntityBase implements a few handy methods to access the third party settings. ConfigEntityBase::getThirdPartySetting(), ConfigEntityBase::setThirdPartySetting().

$migration->getThirdPartySetting('migrate_plus', 'migration_group'); should work.

stBorchert’s picture

Assigned: Unassigned » stBorchert

I'm actually creating a patch for this ...

stBorchert’s picture

Assigned: stBorchert » Unassigned
Status: Active » Needs review
FileSize
7.74 KB

Here is the proposed patch. It is based on the branch "split".
I've updated the example files to use third_party_settings instead of the self-defined migration_group and changed the load-hook accordingly.

I will create follow-up issue for Migrate Tools because a small change is necessary there also.

stBorchert’s picture

Forgot to update the test.
Btw.: the test fails for me (and on testbot) because of a "PluginNotFoundException". No idea, why.

  • mikeryan committed 2f33339 on 8.x-1.x authored by stBorchert
    Issue #2613336 by stBorchert, webflo: Convert migration_group to a third...
mikeryan’s picture

Status: Needs review » Fixed

Committed (with some tweaks to the example config files), thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.