Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DependencyInjection] Use more clear message when unused environment variables detected#22976
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedMay 31, 2017
shound't this be for 3.2? |
voronkovich commentedMay 31, 2017
@nicolas-grekas, I've changed the branch to 3.2 |
| class EnvParameterExceptionextends InvalidArgumentException | ||
| { | ||
| publicfunction__construct(array$usedEnvs,\Exception$previous =null) | ||
| publicfunction__construct(array$envs,$message,\Exception$previous =null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
in order to not break BC, the $message arg should be added last, and should be optional ($message = 'Incompatible...')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@nicolas-grekas, You're right. Fixed.
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
👍
fabpot commentedJun 3, 2017
Thank you@voronkovich. |
…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 | MITOld 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
Uh oh!
There was an error while loading.Please reload this page.
Old error message:
New error message: