symfony/symfony — pull request #5157 by sun (2012-08-03 00:16:48+00:00)
Title: Allow to use a custom indentation level for nested YAML keys/nodes/collections.

YAML does not specify an absolute indentation level, but a consistent indentation of nested nodes only: http://yaml.org/spec/current.html#indentation%20space/

Projects that are generally using 2 spaces for indentation should be able to retain consistency with their coding standards by supplying a custom value for the new $indent parameter for Yaml::dump() and Dumper::dump().

The new parameter is a backwards-compatible API addition and defaults to the previous default of 4 (which was changed from 2 via PR #2242 only recently).

The old $indent parameter is renamed to $level, and remains to be used internally only.