2012-04-26 18:43:51 +01:00
|
|
|
CHANGELOG
|
|
|
|
=========
|
|
|
|
|
2017-05-25 10:38:18 +01:00
|
|
|
3.4.0
|
|
|
|
-----
|
|
|
|
|
2017-08-29 21:51:11 +01:00
|
|
|
* the `Dumper`, `Parser`, and `Yaml` classes are marked as final
|
|
|
|
|
2017-05-25 11:16:49 +01:00
|
|
|
* Deprecated the `!php/object:` tag which will be replaced by the
|
|
|
|
`!php/object` tag (without the colon) in 4.0.
|
|
|
|
|
|
|
|
* Deprecated the `!php/const:` tag which will be replaced by the
|
|
|
|
`!php/const` tag (without the colon) in 4.0.
|
|
|
|
|
2017-06-24 15:09:41 +01:00
|
|
|
* Support for the `!str` tag is deprecated, use the `!!str` tag instead.
|
|
|
|
|
2017-05-25 10:38:18 +01:00
|
|
|
* Deprecated using the non-specific tag `!` as its behavior will change in 4.0.
|
|
|
|
It will force non-evaluating your values in 4.0. Use plain integers or `!!float` instead.
|
|
|
|
|
2017-02-17 06:51:07 +00:00
|
|
|
3.3.0
|
|
|
|
-----
|
|
|
|
|
2017-03-19 21:19:14 +00:00
|
|
|
* Starting an unquoted string with a question mark followed by a space is
|
|
|
|
deprecated and will throw a `ParseException` in Symfony 4.0.
|
|
|
|
|
|
|
|
* Deprecated support for implicitly parsing non-string mapping keys as strings.
|
|
|
|
Mapping keys that are no strings will lead to a `ParseException` in Symfony
|
2017-07-23 13:40:01 +01:00
|
|
|
4.0. Use quotes to opt-in for keys to be parsed as strings.
|
2017-02-20 06:08:19 +00:00
|
|
|
|
|
|
|
Before:
|
|
|
|
|
|
|
|
```php
|
|
|
|
$yaml = <<<YAML
|
|
|
|
null: null key
|
|
|
|
true: boolean true
|
|
|
|
2.0: float key
|
|
|
|
YAML;
|
|
|
|
|
|
|
|
Yaml::parse($yaml);
|
|
|
|
```
|
|
|
|
|
|
|
|
After:
|
|
|
|
|
|
|
|
```php
|
|
|
|
|
|
|
|
$yaml = <<<YAML
|
2017-07-23 13:40:01 +01:00
|
|
|
"null": null key
|
|
|
|
"true": boolean true
|
|
|
|
"2.0": float key
|
2017-02-20 06:08:19 +00:00
|
|
|
YAML;
|
|
|
|
|
2017-07-23 13:40:01 +01:00
|
|
|
Yaml::parse($yaml);
|
2017-02-20 06:08:19 +00:00
|
|
|
```
|
|
|
|
|
2017-01-01 10:29:29 +00:00
|
|
|
* Omitted mapping values will be parsed as `null`.
|
|
|
|
|
2017-02-17 06:51:07 +00:00
|
|
|
* Omitting the key of a mapping is deprecated and will throw a `ParseException` in Symfony 4.0.
|
|
|
|
|
2017-01-31 11:07:40 +00:00
|
|
|
* Added support for dumping empty PHP arrays as YAML sequences:
|
|
|
|
|
|
|
|
```php
|
|
|
|
Yaml::dump([], 0, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE);
|
|
|
|
```
|
|
|
|
|
2016-04-23 06:47:09 +01:00
|
|
|
3.2.0
|
|
|
|
-----
|
|
|
|
|
2016-08-25 07:47:13 +01:00
|
|
|
* Mappings with a colon (`:`) that is not followed by a whitespace are deprecated
|
2017-05-21 13:39:29 +01:00
|
|
|
when the mapping key is not quoted and will lead to a `ParseException` in
|
|
|
|
Symfony 4.0 (e.g. `foo:bar` must be `foo: bar`).
|
2016-08-04 23:00:11 +01:00
|
|
|
|
2016-04-23 06:47:09 +01:00
|
|
|
* Added support for parsing PHP constants:
|
|
|
|
|
|
|
|
```php
|
|
|
|
Yaml::parse('!php/const:PHP_INT_MAX', Yaml::PARSE_CONSTANT);
|
|
|
|
```
|
|
|
|
|
2016-08-27 10:58:27 +01:00
|
|
|
* Support for silently ignoring duplicate mapping keys in YAML has been
|
|
|
|
deprecated and will lead to a `ParseException` in Symfony 4.0.
|
2016-08-04 13:37:15 +01:00
|
|
|
|
2016-01-27 19:42:59 +00:00
|
|
|
3.1.0
|
|
|
|
-----
|
|
|
|
|
2017-04-12 20:06:01 +01:00
|
|
|
* Added support to dump `stdClass` and `ArrayAccess` objects as YAML mappings
|
|
|
|
through the `Yaml::DUMP_OBJECT_AS_MAP` flag.
|
|
|
|
|
2016-03-24 12:13:08 +00:00
|
|
|
* Strings that are not UTF-8 encoded will be dumped as base64 encoded binary
|
|
|
|
data.
|
|
|
|
|
2016-02-27 09:37:11 +00:00
|
|
|
* Added support for dumping multi line strings as literal blocks.
|
|
|
|
|
2016-02-20 09:54:12 +00:00
|
|
|
* Added support for parsing base64 encoded binary data when they are tagged
|
|
|
|
with the `!!binary` tag.
|
|
|
|
|
2016-02-17 21:09:28 +00:00
|
|
|
* Added support for parsing timestamps as `\DateTime` objects:
|
|
|
|
|
|
|
|
```php
|
|
|
|
Yaml::parse('2001-12-15 21:59:43.10 -5', Yaml::PARSE_DATETIME);
|
|
|
|
```
|
|
|
|
|
|
|
|
* `\DateTime` and `\DateTimeImmutable` objects are dumped as YAML timestamps.
|
|
|
|
|
2016-02-15 17:14:40 +00:00
|
|
|
* Deprecated usage of `%` at the beginning of an unquoted string.
|
|
|
|
|
2016-02-08 18:49:14 +00:00
|
|
|
* Added support for customizing the YAML parser behavior through an optional bit field:
|
|
|
|
|
|
|
|
```php
|
2016-02-09 20:01:34 +00:00
|
|
|
Yaml::parse('{ "foo": "bar", "fiz": "cat" }', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE | Yaml::PARSE_OBJECT | Yaml::PARSE_OBJECT_FOR_MAP);
|
2016-02-08 18:49:14 +00:00
|
|
|
```
|
|
|
|
|
2016-01-27 19:42:59 +00:00
|
|
|
* Added support for customizing the dumped YAML string through an optional bit field:
|
|
|
|
|
|
|
|
```php
|
2016-02-09 19:56:50 +00:00
|
|
|
Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE | Yaml::DUMP_OBJECT);
|
2016-01-27 19:42:59 +00:00
|
|
|
```
|
|
|
|
|
2015-10-11 13:23:49 +01:00
|
|
|
3.0.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
* Yaml::parse() now throws an exception when a blackslash is not escaped
|
|
|
|
in double-quoted strings
|
|
|
|
|
2015-10-11 13:05:15 +01:00
|
|
|
2.8.0
|
|
|
|
-----
|
|
|
|
|
2015-11-24 20:31:58 +00:00
|
|
|
* Deprecated usage of a colon in an unquoted mapping value
|
|
|
|
* Deprecated usage of @, \`, | and > at the beginning of an unquoted string
|
2015-11-25 12:40:04 +00:00
|
|
|
* When surrounding strings with double-quotes, you must now escape `\` characters. Not
|
|
|
|
escaping those characters (when surrounded by double-quotes) is deprecated.
|
|
|
|
|
|
|
|
Before:
|
|
|
|
|
|
|
|
```yml
|
|
|
|
class: "Foo\Var"
|
|
|
|
```
|
|
|
|
|
|
|
|
After:
|
|
|
|
|
|
|
|
```yml
|
|
|
|
class: "Foo\\Var"
|
|
|
|
```
|
2015-10-11 13:05:15 +01:00
|
|
|
|
2012-04-26 18:43:51 +01:00
|
|
|
2.1.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
* Yaml::parse() does not evaluate loaded files as PHP files by default
|
|
|
|
anymore (call Yaml::enablePhpParsing() to get back the old behavior)
|