{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/17977","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/17977/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/17977/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/17977/events","html_url":"https://github.com/symfony/symfony/issues/17977","id":137674887,"number":17977,"title":"New DUMP_MULTI_LINE_LITERAL_BLOCK doesn't indent at all","user":{"login":"schorsch3000","id":2485762,"avatar_url":"https://avatars.githubusercontent.com/u/2485762?v=3","gravatar_id":"","url":"https://api.github.com/users/schorsch3000","html_url":"https://github.com/schorsch3000","followers_url":"https://api.github.com/users/schorsch3000/followers","following_url":"https://api.github.com/users/schorsch3000/following{/other_user}","gists_url":"https://api.github.com/users/schorsch3000/gists{/gist_id}","starred_url":"https://api.github.com/users/schorsch3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schorsch3000/subscriptions","organizations_url":"https://api.github.com/users/schorsch3000/orgs","repos_url":"https://api.github.com/users/schorsch3000/repos","events_url":"https://api.github.com/users/schorsch3000/events{/privacy}","received_events_url":"https://api.github.com/users/schorsch3000/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symfony/symfony/labels/Yaml","name":"Yaml","color":"DDDDDD"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-01T20:13:55Z","updated_at":"2016-03-01T20:42:21Z","closed_at":"2016-03-01T20:37:40Z","body":"Hi,\r\ni've tested the new DUMP_MULTI_LINE_LITERAL_BLOCK which got into master a few days ago with eff69028e7e8081ff7bf5b681eba7ba8d54b2da2. It seems it doesn't indent the literal block at all as it should.\r\n\r\ni've used this simple example:\r\n````\r\n<?php\r\ninclude 'vendor/autoload.php';\r\nuse Symfony\\Component\\Yaml\\Yaml;\r\n$data = ['foo' => 'bar', 'error' => \"foo\\nbar\"];\r\n$yaml = Yaml::dump($data, 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK);\r\nYaml::parse($yaml);\r\n````\r\nwhile requiring  \"symfony/yaml\": \"dev-master\"\r\n\r\nthe string in $yaml is:\r\n````\r\nfoo: bar\r\nerror: |\r\nfoo\r\nbar\r\n````\r\n\r\nit should be:\r\n````\r\nfoo: bar\r\nerror: |\r\n    foo\r\n    bar\r\n````\r\n\r\nthat's because the parser throws:\r\n\r\n````\r\nFatal error: Uncaught exception 'Symfony\\Component\\Yaml\\Exception\\ParseException' with message 'Unable to parse at line 3 (near \"foo\").' in vendor/symfony/yaml/Parser.php on line 321\r\n````\r\n\r\nI don't think that it matters, but since the bug report guidelines talk about this stuff, here are some of my details:\r\n````\r\n$ cat /etc/debian_version \r\n8.3\r\n$ uname -a\r\nLinux localhost 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux\r\n$ php -v\r\nPHP 5.6.17-0+deb8u1 (cli) (built: Jan 13 2016 09:10:12) \r\nCopyright (c) 1997-2015 The PHP Group\r\nZend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies\r\n    with XCache v3.2.0, Copyright (c) 2005-2014, by mOo\r\n    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies\r\n    with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans\r\n    with XCache Optimizer v3.2.0, Copyright (c) 2005-2014, by mOo\r\n    with XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo\r\n    with XCache Coverager v3.2.0, Copyright (c) 2005-2014, by mOo\r\n$ grep -A 12 '\"name\": \"symfony/yaml\"'  composer.lock \r\n            \"name\": \"symfony/yaml\",\r\n            \"version\": \"dev-master\",\r\n            \"source\": {\r\n                \"type\": \"git\",\r\n                \"url\": \"https://github.com/symfony/yaml.git\",\r\n                \"reference\": \"c9821ffc2965d57b0404e40ef08dc8da642238f2\"\r\n            },\r\n            \"dist\": {\r\n                \"type\": \"zip\",\r\n                \"url\": \"https://api.github.com/repos/symfony/yaml/zipball/c9821ffc2965d57b0404e40ef08dc8da642238f2\",\r\n                \"reference\": \"c9821ffc2965d57b0404e40ef08dc8da642238f2\",\r\n                \"shasum\": \"\"\r\n            },\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/190892157","html_url":"https://github.com/symfony/symfony/issues/17977#issuecomment-190892157","issue_url":"https://api.github.com/repos/symfony/symfony/issues/17977","id":190892157,"user":{"login":"schorsch3000","id":2485762,"avatar_url":"https://avatars.githubusercontent.com/u/2485762?v=3","gravatar_id":"","url":"https://api.github.com/users/schorsch3000","html_url":"https://github.com/schorsch3000","followers_url":"https://api.github.com/users/schorsch3000/followers","following_url":"https://api.github.com/users/schorsch3000/following{/other_user}","gists_url":"https://api.github.com/users/schorsch3000/gists{/gist_id}","starred_url":"https://api.github.com/users/schorsch3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schorsch3000/subscriptions","organizations_url":"https://api.github.com/users/schorsch3000/orgs","repos_url":"https://api.github.com/users/schorsch3000/repos","events_url":"https://api.github.com/users/schorsch3000/events{/privacy}","received_events_url":"https://api.github.com/users/schorsch3000/received_events","type":"User","site_admin":false},"created_at":"2016-03-01T20:42:21Z","updated_at":"2016-03-01T20:42:21Z","body":"@xabbuh Everything seems fine now that i handle the dumper right, Thanks for working on that, and thanks for that fast support that late! "}}