Follow up for #1953404: Add config schema to field and instance config entities
Problem/motivation
#1866610: Introduce Kwalify-inspired schema format for configuration introduced the idea of config schema. The changelog leads to (hopefully extensive) documentation on the format at http://drupal.org/node/1905070. As a part of schema addition to field module(#1953404: Add config schema to field and instance config entities), found that we have to provide schema for field types, field widgets and field storage.
Proposed solution
Create a configuration schema for field types, field widget and field storage (if applicable) defined in entity_reference module.
Schema in place
Schema not in place
field.entity_reference.settings
field.entity_reference.instance_settings
field.entity_reference.value
field_widget.entity_reference_autocomplete.settings
field_widget.entity_reference_autocomplete_tags.settings
Comment | File | Size | Author |
---|---|---|---|
#17 | 1983902-config-schema-entity_reference-17.patch | 2.79 KB | vijaycs85 |
#17 | 1983902-diff-15-17.txt | 1.4 KB | vijaycs85 |
#15 | 1983902-config-schema-entity_reference-15.patch | 2.79 KB | vijaycs85 |
#15 | 1983902-diff-14-15.txt | 1.08 KB | vijaycs85 |
#14 | 1983902-config-schema-entity_reference-14.patch | 2.37 KB | vijaycs85 |
Comments
Comment #1
vijaycs85Issuing initial patch with config inspector screenshots.
Comment #2
amateescu CreditAttribution: amateescu commentedLooks good to me.
Comment #3
amateescu CreditAttribution: amateescu commentedActually, that's not right. Widget definitions have been moved out of the instance definition in #1875992: Add EntityFormDisplay objects for entity forms.
Comment #4
piyuesh23 CreditAttribution: piyuesh23 at QED42 commentedRemoved widget definitions from schema. Attaching the fixed patch.
Comment #5
piyuesh23 CreditAttribution: piyuesh23 commentedComment #6
piyuesh23 CreditAttribution: piyuesh23 commentedTested and the schema is working fine. Tested using config inspector.
Comment #7
piyuesh23 CreditAttribution: piyuesh23 commentedComment #8
vijaycs85@piyuesh23 lets get one more review before RTBC :)
Comment #9
aspilicious CreditAttribution: aspilicious commenteduser register form key is obsolete now
Comment #10
swentel CreditAttribution: swentel commentedComment #11
amateescu CreditAttribution: amateescu commentedShouldn't this be 'field.entity_reference.target_id' and 'Target ID'?
Comment #12
vijaycs85We got more than just field implementation as part of this issue. Check https://gist.github.com/vijaycs85/7917782 for more details...
Comment #13
vijaycs85Comment #14
vijaycs85Updating with views & default entity_reference plugins... remaining to follow...
Comment #15
vijaycs85Ok, just did a full scan of entity_reference in our code base and here are the findings:
The patch in #14 covers all listed above except 3.3. Here is the patch for it.
Comment #16
amateescu CreditAttribution: amateescu commentedIs '' allowed/the correct syntax? Couldn't we just wrap the whole string in "" ?
I think the correct order (by how they are defined/importance) would be:
- target_bundles
- sort
- filter
- auto_create
Comment #17
vijaycs85@amateescu, thanks for the quick response...
Reg:
#16.1 - Yes, single quotes is the escape character in yml and we have done in lots of places (Can check with reg search [a-zA-Z]+''[a-zA-Z]+)
#16.2 - Order of the fields really not fixed. sometimes it gets changed whenever we save config (view config is a good example.), but I just updated it as we want them in this order...
Comment #18
amateescu CreditAttribution: amateescu commentedOk then, this looks ready to me.
Comment #19
webchickCommitted and pushed to 8.x. Thanks!