The YAML 1.1 spec includes support for non-scalar keys in mappings. PHP
does not support non-scalar keys in its native array constructs.
Previously we handled this feature mismatch during YAML document parsing
by converting non-scalar key values to strings before using them as
keys. This approach provides some level of support for this
'interesting' part of the YAML specification, but it also leads to PHP
structures which cannot be cleanly round tripped back to a YAML document
matching the original input. It can also cause high runtime memory usage
for perverse YAML input.
Non-scalar keys will now generate a warning and omit the value from the
constructed array.
The YAML 1.1 spec includes support for non-scalar keys in mappings. PHP does not support non-scalar keys in its native array constructs. Previously we handled this feature mismatch during YAML document parsing by converting non-scalar key values to strings before using them as keys. This approach provides some level of support for this 'interesting' part of the YAML specification, but it also leads to PHP structures which cannot be cleanly round tripped back to a YAML document matching the original input. It can also cause high runtime memory usage for perverse YAML input.
Non-scalar keys will now generate a warning and omit the value from the constructed array.
Bug: 64694 Bug: 77720