Skip to content

Don't throw fatal errors for unused env vars #23520

Closed
@javiereguiluz

Description

@javiereguiluz
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version 3.3.x

While upgrading an app to Symfony 3.3 + Symfony Flex, I'm facing some issues. All of them look reasonable to me, except this one:

Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\EnvParameterException:

Environment variables "DATABASE_URL" are never used. Please, check your
container's configuration.

I think it's crazy to throw a fatal error just because I'm not using a defined env var. Could we please change this behavior? Thanks!

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