Skip to content

[RFC][DX] Defaulting missing env variables to empty string #31497

Closed
@Jean85

Description

@Jean85

Description
I'm hitting a constant issue while deploying my Symfony apps with Docker: during the Docker build I want to issue the cache:warmup command, and in that environment a lot of env variables are missing, because I'm not actually in the prod environment.

This forces me to define in the parameters a bunch of default values for env variables, so the container dump process will not complain about those. And those values are normally defaults or empty string.

I would like to suggest a new behavior: not complaining about missing env vars, at least during cache warmup: this would allow us to avoid defining all those variables as empty, and concentrate on having them just in the real prod environment.

Example
This could be done in some way like bin/console cache:warmup --ignore-missing-envs. WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    DXDX = Developer eXperience (anything that improves the experience of using Symfony)DependencyInjectionRFCRFC = Request For Comments (proposals about features that you want to be discussed)Stalled

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions