Closed
Description
Frequently we get requests asking for how specifc object structures should be dumped to YAML (for examples, see #16266 and #17391, but there are more of them). We always were reluctant to implement these features as they would either have meant BC breaks (because of semantic changes to the dumped YAML) or because the semantics did not change (changes were merely aesthetic).
Maybe it's time we break with this and introduce dumper flags that control how YAML strings are dumped (similar to what was recently done for the VarDumper component in #17305). This would allow users to influence the dumped YAML without requiring us to introduce lots of additional parameters (the $objectSupport
argument could be replaced with the dumper flags argument).