Debian Codegraph @

vendor/symfony/yaml/CHANGELOG.md

raw
1 CHANGELOG
2 =========
3
4 5.4
5 ---
6
7 * Add a `$maxNestingLevel` argument to `Parser::__construct()`, `Yaml::parse()` and `Yaml::parseFile()` to bound recursion depth (default 128)
8 * Add a `$maxAliasesForCollections` argument to `Parser::__construct()`, `Yaml::parse()` and `Yaml::parseFile()` to bound alias expansion of collection values (default 128)
9 * Add `Yaml::PARSE_EXCEPTION_ON_ALIAS` to reject YAML aliases while parsing untrusted input
10 * Add new `lint:yaml dirname --exclude=/dirname/foo.yaml --exclude=/dirname/bar.yaml`
11 option to exclude one or more specific files from multiple file list
12 * Allow negatable for the parse tags option with `--no-parse-tags`
13
14 5.3
15 ---
16
17 * Added `github` format support & autodetection to render errors as annotations
18 when running the YAML linter command in a Github Action environment.
19
20 5.1.0
21 -----
22
23 * Added support for parsing numbers prefixed with `0o` as octal numbers.
24 * Deprecated support for parsing numbers starting with `0` as octal numbers. They will be parsed as strings as of Symfony 6.0. Prefix numbers with `0o`
25 so that they are parsed as octal numbers.
26
27 Before:
28
29 ```yaml
30 Yaml::parse('072');
31 ```
32
33 After:
34
35 ```yaml
36 Yaml::parse('0o72');
37 ```
38
39 * Added `yaml-lint` binary.
40 * Deprecated using the `!php/object` and `!php/const` tags without a value.
41
42 5.0.0
43 -----
44
45 * Removed support for mappings inside multi-line strings.
46 * removed support for implicit STDIN usage in the `lint:yaml` command, use `lint:yaml -` (append a dash) instead to make it explicit.
47
48 4.4.0
49 -----
50
51 * Added support for parsing the inline notation spanning multiple lines.
52 * Added support to dump `null` as `~` by using the `Yaml::DUMP_NULL_AS_TILDE` flag.
53 * deprecated accepting STDIN implicitly when using the `lint:yaml` command, use `lint:yaml -` (append a dash) instead to make it explicit.
54
55 4.3.0
56 -----
57
58 * Using a mapping inside a multi-line string is deprecated and will throw a `ParseException` in 5.0.
59
60 4.2.0
61 -----
62
63 * added support for multiple files or directories in `LintCommand`
64
65 4.0.0
66 -----
67
68 * The behavior of the non-specific tag `!` is changed and now forces
69 non-evaluating your values.
70 * complex mappings will throw a `ParseException`
71 * support for the comma as a group separator for floats has been dropped, use
72 the underscore instead
73 * support for the `!!php/object` tag has been dropped, use the `!php/object`
74 tag instead
75 * duplicate mapping keys throw a `ParseException`
76 * non-string mapping keys throw a `ParseException`, use the `Yaml::PARSE_KEYS_AS_STRINGS`
77 flag to cast them to strings
78 * `%` at the beginning of an unquoted string throw a `ParseException`
79 * mappings with a colon (`:`) that is not followed by a whitespace throw a
80 `ParseException`
81 * the `Dumper::setIndentation()` method has been removed
82 * being able to pass boolean options to the `Yaml::parse()`, `Yaml::dump()`,
83 `Parser::parse()`, and `Dumper::dump()` methods to configure the behavior of
84 the parser and dumper is no longer supported, pass bitmask flags instead
85 * the constructor arguments of the `Parser` class have been removed
86 * the `Inline` class is internal and no longer part of the BC promise
87 * removed support for the `!str` tag, use the `!!str` tag instead
88 * added support for tagged scalars.
89
90 ```yml
91 Yaml::parse('!foo bar', Yaml::PARSE_CUSTOM_TAGS);
92 // returns TaggedValue('foo', 'bar');
93 ```
94
95 3.4.0
96 -----
97
98 * added support for parsing YAML files using the `Yaml::parseFile()` or `Parser::parseFile()` method
99
100 * the `Dumper`, `Parser`, and `Yaml` classes are marked as final
101
102 * Deprecated the `!php/object:` tag which will be replaced by the
103 `!php/object` tag (without the colon) in 4.0.
104
105 * Deprecated the `!php/const:` tag which will be replaced by the
106 `!php/const` tag (without the colon) in 4.0.
107
108 * Support for the `!str` tag is deprecated, use the `!!str` tag instead.
109
110 * Deprecated using the non-specific tag `!` as its behavior will change in 4.0.
111 It will force non-evaluating your values in 4.0. Use plain integers or `!!float` instead.
112
113 3.3.0
114 -----
115
116 * Starting an unquoted string with a question mark followed by a space is
117 deprecated and will throw a `ParseException` in Symfony 4.0.
118
119 * Deprecated support for implicitly parsing non-string mapping keys as strings.
120 Mapping keys that are no strings will lead to a `ParseException` in Symfony
121 4.0. Use quotes to opt-in for keys to be parsed as strings.
122
123 Before:
124
125 ```php
126 $yaml = <<<YAML
127 null: null key
128 true: boolean true
129 2.0: float key
130 YAML;
131
132 Yaml::parse($yaml);
133 ```
134
135 After:
136
137 ```php
138
139 $yaml = <<<YAML
140 "null": null key
141 "true": boolean true
142 "2.0": float key
143 YAML;
144
145 Yaml::parse($yaml);
146 ```
147
148 * Omitted mapping values will be parsed as `null`.
149
150 * Omitting the key of a mapping is deprecated and will throw a `ParseException` in Symfony 4.0.
151
152 * Added support for dumping empty PHP arrays as YAML sequences:
153
154 ```php
155 Yaml::dump([], 0, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE);
156 ```
157
158 3.2.0
159 -----
160
161 * Mappings with a colon (`:`) that is not followed by a whitespace are deprecated
162 when the mapping key is not quoted and will lead to a `ParseException` in
163 Symfony 4.0 (e.g. `foo:bar` must be `foo: bar`).
164
165 * Added support for parsing PHP constants:
166
167 ```php
168 Yaml::parse('!php/const:PHP_INT_MAX', Yaml::PARSE_CONSTANT);
169 ```
170
171 * Support for silently ignoring duplicate mapping keys in YAML has been
172 deprecated and will lead to a `ParseException` in Symfony 4.0.
173
174 3.1.0
175 -----
176
177 * Added support to dump `stdClass` and `ArrayAccess` objects as YAML mappings
178 through the `Yaml::DUMP_OBJECT_AS_MAP` flag.
179
180 * Strings that are not UTF-8 encoded will be dumped as base64 encoded binary
181 data.
182
183 * Added support for dumping multi line strings as literal blocks.
184
185 * Added support for parsing base64 encoded binary data when they are tagged
186 with the `!!binary` tag.
187
188 * Added support for parsing timestamps as `\DateTime` objects:
189
190 ```php
191 Yaml::parse('2001-12-15 21:59:43.10 -5', Yaml::PARSE_DATETIME);
192 ```
193
194 * `\DateTime` and `\DateTimeImmutable` objects are dumped as YAML timestamps.
195
196 * Deprecated usage of `%` at the beginning of an unquoted string.
197
198 * Added support for customizing the YAML parser behavior through an optional bit field:
199
200 ```php
201 Yaml::parse('{ "foo": "bar", "fiz": "cat" }', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE | Yaml::PARSE_OBJECT | Yaml::PARSE_OBJECT_FOR_MAP);
202 ```
203
204 * Added support for customizing the dumped YAML string through an optional bit field:
205
206 ```php
207 Yaml::dump(['foo' => new A(), 'bar' => 1], 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE | Yaml::DUMP_OBJECT);
208 ```
209
210 3.0.0
211 -----
212
213 * Yaml::parse() now throws an exception when a blackslash is not escaped
214 in double-quoted strings
215
216 2.8.0
217 -----
218
219 * Deprecated usage of a colon in an unquoted mapping value
220 * Deprecated usage of @, \`, | and > at the beginning of an unquoted string
221 * When surrounding strings with double-quotes, you must now escape `\` characters. Not
222 escaping those characters (when surrounded by double-quotes) is deprecated.
223
224 Before:
225
226 ```yml
227 class: "Foo\Var"
228 ```
229
230 After:
231
232 ```yml
233 class: "Foo\\Var"
234 ```
235
236 2.1.0
237 -----
238
239 * Yaml::parse() does not evaluate loaded files as PHP files by default
240 anymore (call Yaml::enablePhpParsing() to get back the old behavior)