Problem/Motivation

As a site owner migrating my site from Drupal 7 running environment_indicator-7.x-2.x to Drupal 8 or 9 running environment_indicator-4.x, I want to migrate configuration from environment_indicator, so that my Drupal 8/9 site has the same behavior as my Drupal 7 site.

Proposed resolution

Add migrations.

Remaining tasks

  1. Write a patch
  2. Review and feedback
  3. RTBC and feedback
  4. Commit
  5. Release

User interface changes

None.

API changes

None.

Data model changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mparker17 created an issue. See original summary.

mparker17’s picture

Status: Active » Needs work
FileSize
5.72 KB

Here's an initial patch to migrate the settings. I still need to migrate the hostname indicators.

mparker17’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
21.03 KB
19.36 KB

Here's an updated patch. Reviews welcome.

mparker17’s picture

FileSize
21.32 KB
929 bytes

Here's a patch with a more-accurate docblock for tests/src/Kernel/Migrate/d7/ValidateMigrationStateTest.php

mparker17’s picture

Note my patch adds automated tests, but it looks like automated testing is not enabled for this project... a module maintainer(s) could enable automated tests for the 4.x branch by...

  1. Going to the project page and clicking the Automated testing tab
  2. Clicking `Add test / retest` under the "4.x-dev" release
  3. Entering the following information on the "Add branch test" page...
    • Environment = PHP 7.3 & MySQL 5.7
    • Core = Drupal 9 Supported, currently 9.1.x
    • Schedule = Run on commit and for issues
    • Click Save & queue
Wim Leers’s picture

Does it really make sense to migrate this configuration? I think usually the hostnames will be different?

mparker17’s picture

The current plan is to keep the hostnames for the small business whose website I'm migrating. At the very least, it would be helpful for everything to migrate exactly first, and then be able to change it later as needed. See also the Background and Problem / Motivation sections in my blog post: https://consensus.enterprises/blog/migrations-1-migrate-core/

If it helps, I don't mind becoming a co-maintainer of Environment Indicator and taking responsibility for maintaining the migration stuff... I've used environment indicator on almost every site I've worked on, and I don't anticipate that changing anytime soon.

mparker17’s picture

I am happy to report that I was able to use this patch to successfully migrate my Environment Indicator module configuration from my drupal-7.99 site running environment_indicator-7.x-2.9 to a drupal-10.2.1 site running environment_indicator-4.0.17.

I cannot RTBC this issue because I wrote the patch. But, hopefully, my success will help other people migrating D7 to D10.

However, now that my D7 to D10 site migration is complete, my ability to contribute further to this issue is severely limited, because the D7 site that I had been using to test has been retired. But, I'll keep an eye on this issue and try to answer questions to the best of my ability.