Closed (fixed)
Project:
Drupal core
Version:
9.1.x-dev
Component:
migration system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jun 2020 at 05:02 UTC
Updated:
14 Aug 2020 at 01:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
neclimdulMigrationInterface might not actually be the right place. Here's a patch with the method on RequirementsInterface.
Comment #3
neclimdulyeah... nope. That's going to fail hard. Requirements interface has a bunch of different contexts its used in and most can't list plugin ids. Going to have to be specific to migrations.
Comment #4
neclimdulLets see how testbot feels about this.
Comment #5
dinarcon commentedThanks for getting a fix started @neclimdul. This is also affecting the --execute-dependencies flag in Migrate Tools and (probably) Migrate Run. Referencing a related issue where adding a new interface is mentioned.
Comment #6
neclimdulI knew that looked too clever and I didn't remember writing it. I'm sure I stole the idea from Migrate Tools. :-D
Here's a patch with tests. The method doesn't really do much so the test is pretty trivial.
Comment #7
neclimdulYou know, sometimes you don't see things until you see it in the patch review...
}}
Sorry for being lazy about the interdiffs, I have a couple patches i'm working on in the same branch so its a pain. #6 just added the tests. This just fixes the }} in the doc.
Comment #8
heddnEasy enough change here. +1.
Comment #9
alexpottI think this is allowed under our 1-1 interface to class rule - but given we're adding a method to an interface I think we should have a change record.
To prevent future re-work let's add a return typehint. Yes the mix of methods without a return hint and ones with is meh but if adding new things without out this is adding to future work.
Comment #10
quietone commented#10 Added a CR and here is a patch with the return type declarations.
Comment #11
neclimdulI'm not sure what our code style for return types is but I assume the spacing on these should be consistent?
Comment #12
quietone commentedI couldn't find anything for return types in the coding standards but grep shows the convention is the second one,
public function getRequirements(): array;. Updated the patch accordingly.There is a change record, so removing tag.
Comment #13
neclimdulawesome. I think this can go back to RTBC.
Comment #15
heddnComment #17
larowlanCommitted 90c7d4c and pushed to 9.1.x. Thanks!
Published the change-record.
Didn't backport this because there's an outside chance of disruption.