commit | author | age
|
2207d6
|
1 |
CHANGELOG |
W |
2 |
========= |
|
3 |
|
|
4 |
4.3.0 |
|
5 |
----- |
|
6 |
|
|
7 |
* Using a mapping inside a multi-line string is deprecated and will throw a `ParseException` in 5.0. |
|
8 |
|
|
9 |
4.2.0 |
|
10 |
----- |
|
11 |
|
|
12 |
* added support for multiple files or directories in `LintCommand` |
|
13 |
|
|
14 |
4.0.0 |
|
15 |
----- |
|
16 |
|
|
17 |
* The behavior of the non-specific tag `!` is changed and now forces |
|
18 |
non-evaluating your values. |
|
19 |
* complex mappings will throw a `ParseException` |
|
20 |
* support for the comma as a group separator for floats has been dropped, use |
|
21 |
the underscore instead |
|
22 |
* support for the `!!php/object` tag has been dropped, use the `!php/object` |
|
23 |
tag instead |
|
24 |
* duplicate mapping keys throw a `ParseException` |
|
25 |
* non-string mapping keys throw a `ParseException`, use the `Yaml::PARSE_KEYS_AS_STRINGS` |
|
26 |
flag to cast them to strings |
|
27 |
* `%` at the beginning of an unquoted string throw a `ParseException` |
|
28 |
* mappings with a colon (`:`) that is not followed by a whitespace throw a |
|
29 |
`ParseException` |
|
30 |
* the `Dumper::setIndentation()` method has been removed |
|
31 |
* being able to pass boolean options to the `Yaml::parse()`, `Yaml::dump()`, |
|
32 |
`Parser::parse()`, and `Dumper::dump()` methods to configure the behavior of |
|
33 |
the parser and dumper is no longer supported, pass bitmask flags instead |
|
34 |
* the constructor arguments of the `Parser` class have been removed |
|
35 |
* the `Inline` class is internal and no longer part of the BC promise |
|
36 |
* removed support for the `!str` tag, use the `!!str` tag instead |
|
37 |
* added support for tagged scalars. |
|
38 |
|
|
39 |
```yml |
|
40 |
Yaml::parse('!foo bar', Yaml::PARSE_CUSTOM_TAGS); |
|
41 |
// returns TaggedValue('foo', 'bar'); |
|
42 |
``` |
|
43 |
|
|
44 |
3.4.0 |
|
45 |
----- |
|
46 |
|
|
47 |
* added support for parsing YAML files using the `Yaml::parseFile()` or `Parser::parseFile()` method |
|
48 |
|
|
49 |
* the `Dumper`, `Parser`, and `Yaml` classes are marked as final |
|
50 |
|
|
51 |
* Deprecated the `!php/object:` tag which will be replaced by the |
|
52 |
`!php/object` tag (without the colon) in 4.0. |
|
53 |
|
|
54 |
* Deprecated the `!php/const:` tag which will be replaced by the |
|
55 |
`!php/const` tag (without the colon) in 4.0. |
|
56 |
|
|
57 |
* Support for the `!str` tag is deprecated, use the `!!str` tag instead. |
|
58 |
|
|
59 |
* Deprecated using the non-specific tag `!` as its behavior will change in 4.0. |
|
60 |
It will force non-evaluating your values in 4.0. Use plain integers or `!!float` instead. |
|
61 |
|
|
62 |
3.3.0 |
|
63 |
----- |
|
64 |
|
|
65 |
* Starting an unquoted string with a question mark followed by a space is |
|
66 |
deprecated and will throw a `ParseException` in Symfony 4.0. |
|
67 |
|
|
68 |
* Deprecated support for implicitly parsing non-string mapping keys as strings. |
|
69 |
Mapping keys that are no strings will lead to a `ParseException` in Symfony |
|
70 |
4.0. Use quotes to opt-in for keys to be parsed as strings. |
|
71 |
|
|
72 |
Before: |
|
73 |
|
|
74 |
```php |
|
75 |
$yaml = <<<YAML |
|
76 |
null: null key |
|
77 |
true: boolean true |
|
78 |
2.0: float key |
|
79 |
YAML; |
|
80 |
|
|
81 |
Yaml::parse($yaml); |
|
82 |
``` |
|
83 |
|
|
84 |
After: |
|
85 |
|
|
86 |
```php |
|
87 |
|
|
88 |
$yaml = <<<YAML |
|
89 |
"null": null key |
|
90 |
"true": boolean true |
|
91 |
"2.0": float key |
|
92 |
YAML; |
|
93 |
|
|
94 |
Yaml::parse($yaml); |
|
95 |
``` |
|
96 |
|
|
97 |
* Omitted mapping values will be parsed as `null`. |
|
98 |
|
|
99 |
* Omitting the key of a mapping is deprecated and will throw a `ParseException` in Symfony 4.0. |
|
100 |
|
|
101 |
* Added support for dumping empty PHP arrays as YAML sequences: |
|
102 |
|
|
103 |
```php |
|
104 |
Yaml::dump([], 0, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE); |
|
105 |
``` |
|
106 |
|
|
107 |
3.2.0 |
|
108 |
----- |
|
109 |
|
|
110 |
* Mappings with a colon (`:`) that is not followed by a whitespace are deprecated |
|
111 |
when the mapping key is not quoted and will lead to a `ParseException` in |
|
112 |
Symfony 4.0 (e.g. `foo:bar` must be `foo: bar`). |
|
113 |
|
|
114 |
* Added support for parsing PHP constants: |
|
115 |
|
|
116 |
```php |
|
117 |
Yaml::parse('!php/const:PHP_INT_MAX', Yaml::PARSE_CONSTANT); |
|
118 |
``` |
|
119 |
|
|
120 |
* Support for silently ignoring duplicate mapping keys in YAML has been |
|
121 |
deprecated and will lead to a `ParseException` in Symfony 4.0. |
|
122 |
|
|
123 |
3.1.0 |
|
124 |
----- |
|
125 |
|
|
126 |
* Added support to dump `stdClass` and `ArrayAccess` objects as YAML mappings |
|
127 |
through the `Yaml::DUMP_OBJECT_AS_MAP` flag. |
|
128 |
|
|
129 |
* Strings that are not UTF-8 encoded will be dumped as base64 encoded binary |
|
130 |
data. |
|
131 |
|
|
132 |
* Added support for dumping multi line strings as literal blocks. |
|
133 |
|
|
134 |
* Added support for parsing base64 encoded binary data when they are tagged |
|
135 |
with the `!!binary` tag. |
|
136 |
|
|
137 |
* Added support for parsing timestamps as `\DateTime` objects: |
|
138 |
|
|
139 |
```php |
|
140 |
Yaml::parse('2001-12-15 21:59:43.10 -5', Yaml::PARSE_DATETIME); |
|
141 |
``` |
|
142 |
|
|
143 |
* `\DateTime` and `\DateTimeImmutable` objects are dumped as YAML timestamps. |
|
144 |
|
|
145 |
* Deprecated usage of `%` at the beginning of an unquoted string. |
|
146 |
|
|
147 |
* Added support for customizing the YAML parser behavior through an optional bit field: |
|
148 |
|
|
149 |
```php |
|
150 |
Yaml::parse('{ "foo": "bar", "fiz": "cat" }', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE | Yaml::PARSE_OBJECT | Yaml::PARSE_OBJECT_FOR_MAP); |
|
151 |
``` |
|
152 |
|
|
153 |
* Added support for customizing the dumped YAML string through an optional bit field: |
|
154 |
|
|
155 |
```php |
|
156 |
Yaml::dump(['foo' => new A(), 'bar' => 1], 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE | Yaml::DUMP_OBJECT); |
|
157 |
``` |
|
158 |
|
|
159 |
3.0.0 |
|
160 |
----- |
|
161 |
|
|
162 |
* Yaml::parse() now throws an exception when a blackslash is not escaped |
|
163 |
in double-quoted strings |
|
164 |
|
|
165 |
2.8.0 |
|
166 |
----- |
|
167 |
|
|
168 |
* Deprecated usage of a colon in an unquoted mapping value |
|
169 |
* Deprecated usage of @, \`, | and > at the beginning of an unquoted string |
|
170 |
* When surrounding strings with double-quotes, you must now escape `\` characters. Not |
|
171 |
escaping those characters (when surrounded by double-quotes) is deprecated. |
|
172 |
|
|
173 |
Before: |
|
174 |
|
|
175 |
```yml |
|
176 |
class: "Foo\Var" |
|
177 |
``` |
|
178 |
|
|
179 |
After: |
|
180 |
|
|
181 |
```yml |
|
182 |
class: "Foo\\Var" |
|
183 |
``` |
|
184 |
|
|
185 |
2.1.0 |
|
186 |
----- |
|
187 |
|
|
188 |
* Yaml::parse() does not evaluate loaded files as PHP files by default |
|
189 |
anymore (call Yaml::enablePhpParsing() to get back the old behavior) |