This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Yaml
Fabien Potencier 7479543f9a feature #32669 [Yaml] Add flag to dump NULL as ~ (OskarStark)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] Add flag to dump NULL as ~

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/12071

This PR adds the ability to dump `null` as `~` by a new Flag `Yaml::DUMP_NULL_AS_TILDE`:
```diff
- foo: null
+ foo: ~
```

Todos:
- [x] Fix/add tests

Commits
-------

749c11d94c [Yaml] Add flag to dump NULL as ~
2019-08-04 04:32:09 +02:00
..
Command add parameter type declarations to private methods 2019-07-31 20:51:46 +02:00
Exception Mark ExceptionInterfaces throwable 2018-08-29 17:58:00 +02:00
Tag Add scalar typehints/return types on final/internal/private code 2017-08-31 22:46:21 +02:00
Tests feature #32669 [Yaml] Add flag to dump NULL as ~ (OskarStark) 2019-08-04 04:32:09 +02:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md [Yaml] Add flag to dump NULL as ~ 2019-08-01 09:58:34 +02:00
composer.json Allow Symfony 5.0 2019-05-28 17:53:17 +02:00
Dumper.php Merge branch '3.4' into 4.2 2019-07-24 16:47:26 +02:00
Escaper.php Merge branch '3.4' into 4.1 2019-01-16 19:21:11 +01:00
Inline.php [Yaml] Add flag to dump NULL as ~ 2019-08-01 09:58:34 +02:00
LICENSE update year in license files 2019-01-01 14:45:19 +01:00
Parser.php Merge branch '3.4' into 4.3 2019-08-04 00:32:39 +02:00
phpunit.xml.dist Bump phpunit XSD version to 5.2 2018-11-11 12:18:13 +01:00
README.md Updated all the README files 2016-03-04 08:12:06 +01:00
Unescaper.php Merge branch '3.4' into 4.0 2018-07-26 10:51:09 +02:00
Yaml.php [Yaml] Add flag to dump NULL as ~ 2019-08-01 09:58:34 +02:00

Yaml Component

The Yaml component loads and dumps YAML files.

Resources