Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
migration system
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
3 Jul 2015 at 00:38 UTC
Updated:
21 Jul 2015 at 10:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
phenaproximaThis is much simpler. I like simple. I want to get @alexpott's opinion on this, since he's a CMI guru and can offer insight on what, if anything, we might be losing by this change.
Let's keep the ability to override this in the constructor. We don't need the constant, but it should be a default parameter on __construct().
This is a micro-optimization, but I believe Yaml::decode() can be called statically. Can you do that instead, rather than going through the overhead of instantiating a parser?
The template might include an id. Let's check for that and use it as the key, if it's defined. Otherwise, use the file's base name (sans .yml extension, of course).
Comment #2
neclimdulyeah, we where mostly using CMI for directory listing. Currently I think the only real difference is themes won't be able to provide migration templates. I'm not sure that was an intentional feature but if it was I'll have to make a small addition.
yeah, np. I'll just put both back.
Gah, I'm constantly mixing symfony and core's yaml interface... especially when bouncing between drush which uses symfony's and core.
I'm not sure what you mean by the id change. It seems like that's not really related and might not be something this class should be doing so I left it out of this patch.
Comment #3
phenaproximaLooks OK to me, but in addition to @alexpott I'd also like to get @mikeryan's input before RTBCing.
Comment #4
alexpottYes! I should have thought of this. Nice work @neclimdul
Comment #5
alexpottLet's write stuff compatible with #2304461: KernelTestBaseTNG™. See the patch for how it removes usage of GlobIterator.
Comment #6
neclimdulI'm all for writing phpunit compatible code. Honestly I was just lazy and stole it from CMI :-D
Comment #7
phenaproximaIt's simple. It passes the tests. @alexpott confirmed on IRC that there was no particular need (beyond convenience) for MigrateTemplateStorage to use CMI's discovery mechanisms, and @mikeryan and I are usually on the same page regarding architecture/simplicity.
All this adds up to an RTBC from me. Thanks, @neclimdul!
Comment #8
lostkangaroo commentedI agree lets do this
Comment #9
alexpottI like this.
Committed cc8e7c3 and pushed to 8.0.x. Thanks!
Comment #11
chx commentedSince you are destroying all my migrate work anyways with this template business, why don't you finish and remove them completely from the config entity system as well? Reopen #2462233: Migrations should not use the configuration entity system and be doneEdit: turns out we didn't remove config entity support but amended it; however the change record said
which is wrong. The CR will be fixed.
Comment #12
chx commentedAlso how did this got in without benjy seeing it?
Edit: I am told it's a minor change and as per https://www.drupal.org/governance/core only significant changes need subsystem maintainer approval. Well, then we will (will??) have a dictionary war over the word "significant" :)
Comment #13
alexpott@chx coupling how migrate discovers its templates to CMI default configuration discovery makes no sense. @benjy rtbc-d the template system #2463909-58: Migrations should support non-installed default configurations (templates) and this is a minor change. In fact it is really just a followup to that issue. It is not okay to say
And whilst I appreciate the courage of just crossing out and not removing it, I feel they we should acknowledge that @mikeryan, @phenaproxima, @benjy and others are all working extremely hard to deliver an excellent migration system for Drupal 8.