8000 minor #6650 fix dumper default representation (Jamal Youssefi) · symfony/symfony-docs@1666848 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1666848

Browse files
committed
minor #6650 fix dumper default representation (Jamal Youssefi)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #6650). Discussion ---------- fix dumper default representation Hi, The default representation of dumper when using `Yaml` class is expanded: `public static function dump($array, $inline = 2, $indent = 4, $flags = 0)` May be i'm wrong because the `$inline` argument is different in `Yaml` (default inline=2 so expanded) and `Dumper` (default inline=0 so inline) class. So it depend to which class we refer to. Commits ------- def7c99 fix dumper default representation
2 parents fe24815 + def7c99 commit 1666848

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

components/yaml/introduction.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,15 @@ Array Expansion and Inlining
167167
............................
168168

169169
The YAML format supports two kind of representation for arrays, the expanded
170-
one, and the inline one. By default, the dumper uses the inline
170+
one, and the inline one. By default, the dumper uses the expanded
171171
representation:
172172

173173
.. code-block:: yaml
174174
175-
{ foo: bar, bar: { foo: bar, bar: baz } }
175+
foo: bar
176+
bar:
177+
foo: bar
178+
bar: baz
176179
177180
The second argument of the :method:`Symfony\\Component\\Yaml\\Yaml::dump`
178181
method customizes the level at which the output switches from the expanded

0 commit comments

Comments
 (0)
0