This is a sub-issue of #1910624: [META] Introduce and complete configuration schemas in all of core.
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. While there are little cleanups planned for the format overall, the current format is a result of months of back and forths, so it should be perfectly fine to apply it more widely to core.
Proposed solution
Create a configuration schema for forum module.
Schema in place
Schema not yet in place
forum.settings.yml
Comment | File | Size | Author |
---|---|---|---|
#10 | 1919176-forum-schema-10.patch | 1.39 KB | csg |
#10 | interdiff.txt | 591 bytes | csg |
#10 | containers.png | 46.44 KB | csg |
#9 | 1919176-forum-schema-9.patch | 1.4 KB | sandipmkhairnar |
#9 | forum-shema-forum.png | 16.25 KB | sandipmkhairnar |
Comments
Comment #1
vijaycs85Adding schema file...
Comment #2
sandipmkhairnar CreditAttribution: sandipmkhairnar commentedupdating schema as per code style in http://drupal.org/node/1905070#codestyle and verified in config_inspector
Comment #3
vijaycs85Thanks @sandipmkhairnar, patch looks good except it needs a new line at the end.
Comment #4
sandipmkhairnar CreditAttribution: sandipmkhairnar commentedThanks @vijaycs85, updated patch as per the comment.
Comment #5
rteijeiro CreditAttribution: rteijeiro commentedReviewing and updated SprintWeekend tag.
Comment #6
tstoecklerThis should end in a period.
This should end in a period.
Containers is not a string, but a sequence.
This might be a little picky, but I think this deserves a comment as well. Unless you're some kind of forum.module expert this is very hard to understand, and I doubt many people are...
This (as well as the actual config) should contain a comment referencing _forum_get_topic_order() because this is near impossible to understand without it.
The vocabulary ID is a string, not an integer. It is currently '0', by default, but it really should be ''.
I think this should be 'Forum vocabulary ID' for clarity.
This should end in a period.
Comment #7
tstoecklerCrosspost, didn't mean to unassign.
Comment #8
rteijeiro CreditAttribution: rteijeiro commentedI think that:
'vocabulary' => 'forums'
Should be 'string' not 'integer'. Am I right?
It's the one and only error I have found.
Comment #9
sandipmkhairnar CreditAttribution: sandipmkhairnar commentedThanks to @tstoeckler and @rteijeiro for comments. Corrected labels as per comment.
Comment #10
csg CreditAttribution: csg commentedContainers store taxonomy term ID's, so the type is integer instead of string.
Comment #11
rteijeiro CreditAttribution: rteijeiro commentedIt seems that it's solved:
Ending in period.
Now containers is sequence.
Now vocabulary is string and it's label is changed.
But I am not sure if there should be the comments mentioned in http://drupal.org/node/1919176#comment-7155320
I marked it as "needs review" so tstoeckler should review it better than me :)
Comment #12
csg CreditAttribution: csg commentedIt seems the last review is for #9, so #10 has not been reviewed yet.
Comment #13
tstoecklerI still think we could use some inline comments here, but since we haven't done that for most of the other schema files I won't be a stickler.
I'm not sure about the taxonomy term ID. It is currently stored as an integer in the DB, but we don't really enforce that in the entity system. I.e. someone could make taxonomy terms use the ConfigStorageController and use machine names for taxonomy terms. So maybe we should use string here. On the other hand the actual data is an integer, so I *think* it is correct to use integer.
I am (tentatively) marking this RTBC, and, thus, relaying this question to the core committers.
Comment #14
webchickCommitted to 8.x, thanks! Will push once testbot's caught up a bit.