Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DI] Fix accepting null as default env param value#20512
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
stof commentedNov 14, 2016
but shouldn't we allow it ? It would be useful in case some config treats null as being "don't enable this feature", which is the case for the database_url in Doctrine (allowing to configure with username/password/host locally when not setting the URL) |
nicolas-grekas commentedNov 14, 2016
Could be, but should be allowed for all parameters then (for consistency, and because we use the same code paths for all params, env or not) |
stof commentedNov 14, 2016
normal parameters (non-env-based) allow to store |
9b424a1 toc78e090Comparenicolas-grekas commentedNov 14, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Indeed, I messed up here :) Fixed! |
| publicfunctiontestResolveEnvAllowsNull() | ||
| { | ||
| $bag =newEnvPlaceholderParameterBag(); | ||
| $bag->get('env(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.
It's a bit confusing in this test to useNULL as the var name. What about replacing it byNULL_VAR ? (andNull_Var in the example below)
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.
updated
dunglas commentedNov 14, 2016
👍 |
c78e090 to98c1401Compare98c1401 to7625166Comparexabbuh commentedNov 15, 2016
👍 Status: Reviewed |
fabpot commentedNov 15, 2016
Thank you@nicolas-grekas. |
…s-grekas)This PR was merged into the 3.2-dev branch.Discussion----------[DI] Fix accepting null as default env param value| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#20447| License | MIT| Doc PR | -Commits-------7625166 [DI] Fix accepting null as default env param value
Uh oh!
There was an error while loading.Please reload this page.