Skip to content
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

Confusing error message related to env vars #22955

Closed
javiereguiluz opened this issue May 30, 2017 · 0 comments
Closed

Confusing error message related to env vars #22955

javiereguiluz opened this issue May 30, 2017 · 0 comments

Comments

@javiereguiluz
Copy link
Member

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.2

While working on the Symfony Demo app (see symfony/demo#572) we stumbled upon the issue reported in #22561. In that PR they question this behavior, but here I'm talking strictly about the error message itself:

Symfony\Component\DependencyInjection\Exception\EnvParameterException:
Incompatible use of dynamic environment variables "DATABASE_URL" found in parameters.

I can't understand the error message .. and it gives me no clue about how to fix this problem. Can we please improve it? Thanks!

fabpot added a commit that referenced this issue Jun 3, 2017
…nvironment variables detected (voronkovich)

This PR was squashed before being merged into the 3.2 branch (closes #22976).

Discussion
----------

[DependencyInjection] Use more clear message when unused environment variables detected

| Q             | A
| ------------- | ---
| Branch?       |3.2
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22955
| License       | MIT

Old error message:
```
Incompatible use of dynamic environment variables "DATABASE_URL", "MAILER_URL" found in parameters.
```

New error message:
```
Environment variables "DATABASE_URL", "MAILER_URL" are never used. Please, check your container's configuration.
```

Commits
-------

6dbdb1b [DependencyInjection] Use more clear message when unused environment variables detected
@fabpot fabpot closed this as completed Jun 3, 2017
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

3 participants