I would like to add a simple list of values in a configuration files (config.yml). For example :
my_bundle:
columns: [\"col1\", \"col2\"]
W
I think you're missing that YaML is not a markup language, it's not even a langauge as such (It's a data serialization standard), so it doesn't know of any language constructs, like arrays. Its main "tool" to express grouping and relations between bits of data is whitespace, colons and dashes.
From the symfony documentation page of the YaML format:
my_bundle:
columns:
- col1
- col2
As I gather from this section:
A YAML file is rarely used to describe a simple scalar. Most of the time, it describes a collection. A collection can be a sequence or a mapping of elements. Both sequences and mappings are converted to PHP arrays.
Sequences use a dash followed by a space:
-
PHP
-
Perl
-
PythonThe previous YAML file is equivalent to the following PHP code:
array('PHP', 'Perl', 'Python');