-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Description
I understand the Yaml component partially implements YAML 1.2, and as such does not quote PHP strings containing values that would be considered as boolean values by parsers implementing older versions of the YAML spec.
For example, dumping this PHP array:
array('country_code' => 'no');Would output yaml like:
country_code: noAnd not:
country_code: 'no'This makes using yaml files dumped by the Yaml component in environments where they will be parsed by non-1.2 compliant parsers interesting.
Would it be desirable to change the behaviour of the Dumper so that it quotes possibly-boolean-per-the-older-spec strings ('yes', 'no', 'on', 'off', etc)? Obviously this extra quoting is not required for YAML 1.2 compliance, but I don't think this change would have any harmful side-effects.
It looks like implementing this would be a simple change in the Yaml\Inline class - and I'd be happy to do it (1st time contributer, please be gentle :D) - but I don't really want to try patching this in if it's decided this is a stupid/impossible idea.