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

  1. Determine if \Drupal\serialization\RegisterSerializationClassesCompilerPass::normalizerBcSettingIsEnabled would need to be updated. Or would it just work.
  2. Determine BC policy for this change 😜.Presumablyy we would have to still have read the existing keys until 9.0.
  3. Write patch

User interface changes

None

API changes

None

Data model changes

Schema changes to 'serialization.settings' config object

Comments

tedbow created an issue. See original summary.

Wim Leers’s picture

We need a sister issue for this for rest.settings!

Wim Leers’s picture

Issue tags: +DC Vienna sprint

Thanks for creating this, BTW, this was follow-up from DrupalCon Vienna.

damiankloip’s picture

Regarding 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.

Wim Leers’s picture

Status: Active » Closed (works as designed)

and postpone to D9.

… and in D9 we wouldn't need this anymore anyway, except for new BC keys :)

If we do have to worry about BC and still reading the old setting too

I totally agree. This issue is making us worry about BC of BC, and that's IMHO going too far.

Alright, closing.

xjm’s picture