The content for composer.json is created by combining the default and optional settings. Previously, when trying to override the default setting, the new and old values were stored in a new array, which broke the composer structure. This is the standard behavior of array_merge_recursive(). A better alternative is to use array_replace_recursive(). It works the same way when merging different keys, but replaces the values of the existing keys.
The content for
composer.json
is created by combining the default and optional settings. Previously, when trying to override the default setting, the new and old values were stored in a new array, which broke the composer structure. This is the standard behavior ofarray_merge_recursive()
. A better alternative is to usearray_replace_recursive()
. It works the same way when merging different keys, but replaces the values of the existing keys.