Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private function addGlobalsSection(ArrayNodeDefinition $rootNode)
->arrayNode('globals')
->normalizeKeys(false)
->useAttributeAsKey('key')
->example(['foo' => '"@bar"', 'pi' => 3.14])
->example(['foo' => '@bar', 'pi' => 3.14])
->prototype('array')
->normalizeKeys(false)
->beforeNormalization()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private function writeNode(NodeInterface $node, NodeInterface $parentNode = null

// example
if ($example && !\is_array($example)) {
$comments[] = 'Example: '.$example;
$comments[] = 'Example: '.Inline::dump($example);
}

$default = '' != (string) $default ? ' '.$default : '';
Expand Down Expand Up @@ -165,7 +165,7 @@ private function writeNode(NodeInterface $node, NodeInterface $parentNode = null

$this->writeLine('# '.$message.':', $depth * 4 + 4);

$this->writeArray($example, $depth + 1);
$this->writeArray(array_map([Inline::class, 'dump'], $example), $depth + 1);
}

if ($children) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function provideDumpAtPath()
# this is a long
# multi-line info text
# which should be indented
child3: ~ # Example: example setting
child3: ~ # Example: 'example setting'
EOL
],
'Regular nested' => ['array.child2', <<<EOL
Expand Down Expand Up @@ -112,7 +112,7 @@ enum: ~ # One of "this"; "that"
# this is a long
# multi-line info text
# which should be indented
child3: ~ # Example: example setting
child3: ~ # Example: 'example setting'
scalar_prototyped: []
parameters:

Expand Down