Skip to content

[Yaml] allow forcing quotes with dump() even if they're technically not required #59680

@dkarlovi

Description

@dkarlovi

Description

Say we're dumping an array

['data' => ['OTEL_EXPORTER_OTLP_PROTOCOL' => 'grpc']]

It comes out as

data:
    OTEL_EXPORTER_OTLP_PROTOCOL: grpc

but there's scenarios which require you to quote every string to make parsing it more robust, it should become:

data:
    OTEL_EXPORTER_OTLP_PROTOCOL: "grpc"

ie. even if \Symfony\Component\Yaml\Escaper::requiresDoubleQuoting decided false, you'd still get the quotes, this could be an opt-in flag used here.

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions