Steps to reproduce
- Save an empty object {} in NewcomerTasks.json and GrowthExperimentsConfig.json
- Run the migration script from T359038
What happens
Config is migrated setting all configs defined by providers as an empty array []
That's because CommunityConfiguration\Store\WikiPage\Writer calls $configSorted = get_object_vars( $newConfig ); to sort config options which returns an array, then passed to FormatJson::encode( $configSorted ). When the update is an empty object and $configSorted an empty array the encoding will result in a wrong empty array at the top level of the config.
What should happen instead
Config is migrated setting all configs defined by providers as an empty object {}