Skip to content

cache:clear throws "Environment variables ... are never used" - error after 4.0.9 #27194

Closed
@mmarton

Description

@mmarton

Symfony version(s) affected: 4.0.9

Description

We use ENV variables for mapping file links in exception. After upgrade to 4.0.9 we get

 Environment variables "APP_IDE" are never used. Please, check your container's configuration.``` when running cache:clear although it is used in the framework config.

How to reproduce
.env file

APP_IDE=phpstorm://open?file=%f&line=%l&/var/www/html/>/home/path/to/project/

framework.yaml file

parameters:
    env(APP_IDE): ~

framework:
    ide: '%env(APP_IDE)%'
    ...

After running cache:clear the "never used" error message shown in console

Possible Solution

After some digging in the source i found the debug.file_link_format parameter and passing the ENV to this solves the problem, but I can't find any documentation about this.

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