Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eeaeac1

Browse filesBrowse files
javiereguiluzxabbuh
authored andcommitted
Mention the YAML features not supported by the Yaml component
1 parent 861e72b commit eeaeac1
Copy full SHA for eeaeac1

File tree

Expand file treeCollapse file tree

1 file changed

+24
-13
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+24
-13
lines changed

‎components/yaml/yaml_format.rst

Copy file name to clipboardExpand all lines: components/yaml/yaml_format.rst
+24-13Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,11 @@
44
The YAML Format
55
===============
66

7-
According to the official `YAML`_ website, YAML is "a human friendly data
8-
serialization standard for all programming languages".
9-
10-
Even if the YAML format can describe complex nested data structure, this
11-
article only describes the minimum set of features needed to use YAML as a
12-
configuration file format.
13-
14-
YAML is a simple language that describes data. As PHP, it has a syntax for
15-
simple types like strings, booleans, floats, or integers. But unlike PHP, it
16-
makes a difference between arrays (sequences) and hashes (mappings).
7+
According to the official `YAML website`_, YAML is "a human friendly data
8+
serialization standard for all programming languages". The Symfony Yaml
9+
component implements a subset of the `YAML specification`_. Specifically, it
10+
implements the minimum set of features needed to use YAML as a configuration
11+
file format.
1712

1813
Scalars
1914
-------
@@ -171,8 +166,8 @@ Collections
171166
-----------
172167

173168
A YAML file is rarely used to describe a simple scalar. Most of the time, it
174-
describes a collection. A collection can be a sequence or a mapping of
175-
elements. Both sequences and mappings are converted to PHP arrays.
169+
describes a collection. YAML collections can be a sequence (indexed arrays in PHP)
170+
or a mapping of elements (associative arrays in PHP).
176171

177172
Sequences use a dash followed by a space:
178173

@@ -318,4 +313,20 @@ The YAML specification defines some tags to set the type of any data explicitly:
318313
Pz7Y6OjuDg4J+fn5OTk6enp
319314
56enmleECcgggoBADs=
320315
321-
.. _YAML: http://yaml.org/
316+
Unsupported YAML Features
317+
-------------------------
318+
319+
The following YAML features are not supported by the Symfony Yaml component:
320+
321+
* Multi-documents (``---`` and ``...`` markers);
322+
* Complex mapping keys and complex values starting with ``?``;
323+
* Tagged values as keys;
324+
* The following tags and types: `!!set`, `!!omap`, `!!pairs`, `!!set`, `!!seq`,
325+
`!!bool`, `!!int`, `!!merge`, `!!null`, `!!timestamp`, `!!value`, `!!yaml`;
326+
* Tags (``TAG`` directive; example: ``%TAG ! tag:example.com,2000:app/``)
327+
and tag references (example: ``!<tag:example.com,2000:app/foo>``);
328+
* Using sequence-like syntax for mapping elements (example: ``{foo, bar}``; use
329+
``{foo: ~, bar: ~}`` instead).
330+
331+
.. _`YAML website`: http://yaml.org/
332+
.. _`YAML specification`: http://www.yaml.org/spec/1.2/spec.html

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.