September 6, 2016 Javier Eguiluz

Symfony 3.2 will introduce some minor YAML deprecations in order to make the Yaml component fully compliant with the YAML specification.

Deprecated missing spaces after map keys¶ Contributed by

Christian Flothmann

in #19504. When defining a map, YAML requires to add at least one white space after the colon that separates the key and the value. In previous Symfony versions we didn't require to include that white space. In Symfony 3.2 we've deprecated this behavior and Symfony 4.0 will throw a ParseException . 1 2 3 4 5 6 7 8 9 10 11 # It works in Symfony 3.1, it's deprecated in 3.2, it fails in 4.0 parameters : foo:bar published:true default_page:1 # It works in every past, present and future Symfony version parameters : foo : bar published : true default_page : 1

Deprecated defining duplicated keys¶ Contributed by

Alex Pott

in #19529. In previous Symfony versions, when a single YAML file contained duplicated keys the first key was used and the rest were silently ignored: 1 2 3 4 5 6 # the second key is ignored and this document is parsed # as: 'parameters' => array('key' => 'aaa') parameters : key : 'aaa' # ... key : 'bbb' In Symfony 3.2 this behavior is deprecated and Symfony 4.0 will throw a ParseException , so it's time to check if your YAML files contain duplicated keys.