Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 1 commit intosymfony:masterfromnicolas-grekas:env-no-null
Nov 15, 2016

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedNov 14, 2016
edited
Loading

QA
Branch?master
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#20447
LicenseMIT
Doc PR-

@stof
Copy link
Member

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
Copy link
MemberAuthor

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
Copy link
Member

normal parameters (non-env-based) allow to storenull (they also allow to store arrays, contrary to env parameters)

@nicolas-grekasnicolas-grekasforce-pushed theenv-no-null branch 2 times, most recently from9b424a1 toc78e090CompareNovember 14, 2016 11:10
@nicolas-grekas
Copy link
MemberAuthor

nicolas-grekas commentedNov 14, 2016
edited
Loading

Indeed, I messed up here :) Fixed!

@nicolas-grekasnicolas-grekas changed the title[DI] Fix misleading exception message[DI] Fix accepting null as default env param valueNov 14, 2016
publicfunctiontestResolveEnvAllowsNull()
{
$bag =newEnvPlaceholderParameterBag();
$bag->get('env(NULL)');

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)

jvasseur reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

updated

@dunglas
Copy link
Member

👍

@xabbuh
Copy link
Member

👍

Status: Reviewed

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commit7625166 intosymfony:masterNov 15, 2016
fabpot added a commit that referenced this pull requestNov 15, 2016
…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
@nicolas-grekasnicolas-grekas deleted the env-no-null branchNovember 16, 2016 10:15
@fabpotfabpot mentioned this pull requestNov 17, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz left review comments

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@nicolas-grekas@stof@dunglas@xabbuh@fabpot@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp