Closed
Description
Symfony version(s) affected
7.1
Description
There is no way to dump a YAML section "without values".
How to reproduce
Dumping the following "Docker Compose volumes section":
$yaml = Yaml::dump([
'volumes' => [
'db-data' => null,
],
]);
Will result in:
volumes:
db-data: null
Using an empty string istead will result in:
volumes:
db-data: ''
There is actually no way to dump "without value" like:
volumes:
db-data:
Possible Solution
No response
Additional Context
No response