This is follow to the API First Initiative in DrupalCon Vienna
Problem/Motivation
Currently in core/modules/serialization/config/schema/serialization.schema.yml
there are 2 elements that start with "bc_".
These are backwards compatibility settings to determine if certain serializers should be used.
There may more(many more?) settings needed like these as we address problems in core's serialization process.
Proposed resolution
To better organize this we should create a top level "bc" time in the 'serialization.settings' config object. All bc settings would be put under this. So
serialization.settings.bc_primitives_as_strings
would be changed to serialization.settings.bc.primitives_as_strings
Remaining tasks
- Determine if
\Drupal\serialization\RegisterSerializationClassesCompilerPass::normalizerBcSettingIsEnabled
would need to be updated. Or would it just work. - Determine BC policy for this change 😜.Presumablyy we would have to still have read the existing keys until 9.0.
- Write patch
User interface changes
None
API changes
None
Data model changes
Schema changes to 'serialization.settings' config object
Comments
Comment #2
Wim LeersWe need a sister issue for this for
rest.settings
!Comment #3
Wim LeersThanks for creating this, BTW, this was follow-up from DrupalCon Vienna.
Comment #4
damiankloip CreditAttribution: damiankloip at Acquia commentedRegarding normalizerBcSettingIsEnabled, I think that would need some changes, as it uses BootstrapConfigStorageFactory, we just get back a 'raw' array to deal with. So we would either need to assume that everything is nested under the 'bc' key, and just pass in the sub key OR allow passing in 'bc.some_key' and get the nested value.
If we do have to worry about BC and still reading the old setting too, I would honestly say, this issue might not be worth it :/ and postpone to D9.
Comment #5
Wim Leers… and in D9 we wouldn't need this anymore anyway, except for new BC keys :)
I totally agree. This issue is making us worry about BC of BC, and that's IMHO going too far.
Alright, closing.
Comment #6
xjm