Skip to content

Commit

Permalink
[Yaml] fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jan 17, 2013
1 parent 08ccc62 commit 51d1948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Yaml/Yaml.php
Expand Up @@ -145,7 +145,7 @@ public static function parse($input, $exceptionOnInvalidType = false, $objectSup
*
* @api
*/
public static function dump($array, $inline = 2, $indent = 4, $exceptionOnInvalidType = false, $objectSupport = false)
public static function dump($array, $inline = 2, $indent = 2, $exceptionOnInvalidType = false, $objectSupport = false)
{
$yaml = new Dumper();
$yaml->setIndentation($indent);
Expand Down

2 comments on commit 51d1948

@willdurand
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabpot This is actually a BC break. I don't fully understand why, but thing is, the Yaml parser used a 4 spaces for indentation.

The following commit symfony/yaml@8a6017b says that the default was 4, not 2. So it's not a typo here, or you should document this BC break.

@fabpot
Copy link
Member Author

@fabpot fabpot commented on 51d1948 Jan 27, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default indentation was 2 in Symfony 2.0 and 4 as of Symfony 2.1. I've fixed that now.

Please sign in to comment.