Skip to content

Add a way to resolve environment variables in debug:config #40582

Closed
@melkamar

Description

@melkamar

Description

The bin/console debug:config does not attempt to resolve environment variables (at least in 5.1.11) which makes it difficult to verify that expected values are being passed around.

I don't know if this change may be introduced without any BC breaks but if not, even having the option, like --resolve-env would be nice for situations where I know I want that behavior.

Current behavior

$ bin/console debug:config swiftmailer

Current configuration for extension with alias "swiftmailer"
============================================================

swiftmailer:
    mailers:
        default:
            transport: '%env(string:default:mailer_default_transport:MAILER_TRANSPORT)%'
            host: '%env(string:default:mailer_default_host:MAILER_HOST)%'
            username: '%env(string:default:mailer_default_username:MAILER_USERNAME)%'
            password: '%env(string:default:mailer_default_password:MAILER_PASSWORD)%'
    (...)

Proposed behavior

$ bin/console debug:config swiftmailer

Current configuration for extension with alias "swiftmailer"
============================================================

swiftmailer:
    mailers:
        default:
            transport: 'actual value or error if not resolvable'
            host: 'actual value or error if not resolvable'
            username: 'actual value or error if not resolvable'
            password: 'actual value or error if not resolvable'
    (...)

I did not find an opened issue about this particular problem, just some related ones, such as #20684 (comment)

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