8000 cache:clear throws "Environment variables ... are never used" - error after 4.0.9 · Issue #27194 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mmarton opened this issue May 8, 2018 · 2 comments

Comments

@mmarton
Copy link
mmarton commented May 8, 2018

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.

@nicolas-grekas
Copy link
Member

Hello, I just tried reproducing the behavior you describe here, but from a fresh skeleton everything works on my side. Would you have a more detailed reproducer?

@mmarton
Copy link
Author
mmarton commented May 16, 2018

Hello, I also tried to reproduce my own problem without any success at first time.
Digging it deeper it might be a sign of some another bug. The error only happens in php7.1 with xdebug on.
It's ok in php7.2 with or without xdebug and in php7.1 without xdebug.
Hope it helps.

nicolas-grekas added a commit that referenced this issue May 29, 2018
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] fix registering IDE links

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27194
| License       | MIT
| Doc PR        | -

Reverts some changes made in #27074 in `FrameworkBundle::boot()` that create the linked issue. Leverages changes done in #26138 instead.

Commits
-------

92e3023 [HttpKernel] fix registering IDE links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0