Open marcvangend opened 7 years ago
I am under the vague impression that this can happen when some team members have pecl yaml extension and some don't.
Thanks for the tip. I tried to verify on my own machine if this is indeed the problem. It seems that pecl yaml is not the cause; at least it is not with the combination of software versions I tested.
drush cget language.mappings
is:
map:
no: nb
pt: pt-pt
zh: zh-hans
zh-tw: zh-hant
zh-hk: zh-hant
zh-mo: zh-hant
zh-cht: zh-hant
zh-cn: zh-hans
zh-sg: zh-hans
zh-chs: zh-hans
_core:
default_config_hash: EMWe7Yu4Q5eD-NUfNuQAWGBvYUNZPIinztEtONSmsDc
langcode: nl
map:
'no': nb
...
drush eval "phpinfo();" | grep -i yaml
)drush cget language.mappings
with default yaml extension optionsdrush cget language.mappings
with changed yaml extension options (yaml.output_canonical=1, yaml.decode_binary=1, yaml.decode_php=1, yaml.decode_timestamp=1)
(Excuse me if this is not the right place to ask, I'm not sure if this is a Drush problem.)
When my colleague exports config with
drush cex
, some strings are quoted. I think I was able to trace this back to\Symfony\Component\Yaml\Escaper::requiresSingleQuoting()
, and the behavior seems to make sense because those strings ('null', '~', 'true', 'false', 'y', 'n', 'yes', 'no', 'on', 'off'
) could otherwise be interpreted as booleans.Unfortunately the behavior is not consistent across our team. Sometimes the strings are quoted, sometimes they aren't, so we keep polluting the git history with changed config. We have verified that we use the same Drush version (8.1.10) and Composer version (1.3.2). Since we commit our composer.lock file to git, we also use the same packages. We are not on the exact same PHP7 versions, but looking at the code I think that the PHP version should not matter in this case.
What could be the cause of this? What can I do, or what other information could be relevant to figure out why this is happening? Thank you.