Once #2277941: Allow injecting an arbitrary FieldConfig when building a FieldInstanceConfig is in, we should be able to remove the 'field_uuid' entry in field.instance.* config records.
Until recently, loading the Field for the Instance was primarily based on that field_uuid entry.
But "regular" (non-deleted) load no longer uses it now, and the 'field_uuid' entry is only ever needed to disambiguate between deleted fields with the same name.
It's also annoying when copying a field instance yaml file into config/install as "default config" : it needs to be manually edited out, because the field's uuid won't be the same across drupal installs.
--> We can simply ditch it from field.instance.* records in config, we simply need to explicitly add it before placing the instance in the "state() store of deleted instances" when an instance is deleted.
Patch coming up when #2277941: Allow injecting an arbitrary FieldConfig when building a FieldInstanceConfig is in.
Comment | File | Size | Author |
---|---|---|---|
#17 | interdiff.txt | 553 bytes | yched |
#17 | 2282627-FIC_field_uuid-17.patch | 6.97 KB | yched |
#15 | 2282627-FIC_field_uuid-15.patch | 6.97 KB | yched |
#12 | interdiff.txt | 1.23 KB | yched |
#12 | FIC_field_uuid-2282627-12.patch | 6.97 KB | yched |
Comments
Comment #1
yched CreditAttribution: yched commented#2277941: Allow injecting an arbitrary FieldConfig when building a FieldInstanceConfig got in, here's a candidate patch.
Comment #3
yched CreditAttribution: yched commentedLooks like some parts of core still use FIC::loadByProperties() with a condition on the old 'field_id' property (which in fact references the field_uuid). Removing it will be for another issue...
Comment #4
yched CreditAttribution: yched commented3: FIC_field_uuid-2282627-3.patch queued for re-testing.
Comment #6
yched CreditAttribution: yched commentedThe recently added FieldInstanceConfigEntityUnitTest::testToArray() needs to be updated accordingly.
Comment #7
swentel CreditAttribution: swentel commentedPatch didn't apply anymore for 3 files, rerolled, other than that, this is good to go.
Comment #8
yched CreditAttribution: yched commentedThanks @swentel :-)
Comment #10
yched CreditAttribution: yched commentedReroll
Comment #12
yched CreditAttribution: yched commenteds/getField()/getFieldStorageDefinition()/
Comment #13
yched CreditAttribution: yched commentedGreen, back to RTBC.
Comment #14
yched CreditAttribution: yched commented12: FIC_field_uuid-2282627-12.patch queued for re-testing.
Comment #15
yched CreditAttribution: yched commentedReroll needed after #2286681: Make public properties on ConfigEntityBase protected
Comment #17
yched CreditAttribution: yched commentedForgot one ->uuid.
Comment #18
yched CreditAttribution: yched commented2 weeks in RTBC, can we haz commit ? :-)
Comment #19
andypostAny special reason to call the method still?
Comment #20
alexpottThis is why dreditor has issues! Drive-by reviews where you can not change or see the context... which is...
Committed 18b755b and pushed to 8.x. Thanks!
[Edit: Originally I said dreditor sucks - it does not - but it does expose the limit of our patch review process]
Comment #21
yched CreditAttribution: yched commentedw00t ! Thanks :-)