Follow-up to #2694009: MigrationInterface doesn't include get()

Problem/Motivation

#2694009: MigrationInterface doesn't include get() deprecated get() in favor of specific getters. I've found one bit of configuration I'd like to get out of migration plugins that doesn't have a getter, though - migration_tags.

Proposed resolution

Add getMigrationTags().

Remaining tasks

Do it. Code it.

User interface changes

API changes

Adds public function getMigrationTags(). to MigrationInterface and Migration plugin.

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeryan created an issue. See original summary.

mikeryan’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
1011 bytes
benjy’s picture

Status: Needs review » Needs work
+++ b/core/modules/migrate/src/Plugin/Migration.php
@@ -713,4 +713,11 @@ public function getDestinationIds() {
+    return isset($this->migration_tags) ? $this->migration_tags : [];

Can we not set this as a property on the class then just return $this->migration_tags?

mikeryan’s picture

Status: Needs work » Needs review
FileSize
1.38 KB
773 bytes

Ayup.

Status: Needs review » Needs work

The last submitted patch, 4: add_getter_for-2741385-4.patch, failed testing.

mikeryan’s picture

Status: Needs work » Needs review
FileSize
1.39 KB

For want of a pull, the patch was lost...

benjy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

  • catch committed 2491015 on 8.2.x
    Issue #2741385 by mikeryan, benjy: Add getter for migration_tags
    
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.2.x, thanks!

After committing I realised this needs a change notice, so wrote one, feel free to improve: https://www.drupal.org/node/2752067

mikeryan’s picture

Tweaked the change notice, thanks!

mikeryan’s picture

I've published the change notice.

Status: Fixed » Closed (fixed)

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