-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
shound't this be for 3.2? |
…variables detected
@nicolas-grekas, I've changed the branch to 3.2 |
@@ -18,8 +18,8 @@ | |||
*/ | |||
class EnvParameterException extends InvalidArgumentException | |||
{ | |||
public function __construct(array $usedEnvs, \Exception $previous = null) | |||
public function __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.
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.
👍
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 | 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
Old error message:
New error message: