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] Default undefined env to empty string during compile#28838

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:4.1fromro0NL:env
Oct 17, 2018
Merged

[DI] Default undefined env to empty string during compile#28838

fabpot merged 1 commit intosymfony:4.1fromro0NL:env
Oct 17, 2018

Conversation

@ro0NL
Copy link
Contributor

QA
Branch?4.1
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#28827
LicenseMIT
Doc PRsymfony/symfony-docs#...

Instead of usingnull for undefined envs, use"" instead. We already default the type to string, so actually providing a string value makes sense. During runtime it will always be string also.

@ro0NL
Copy link
ContributorAuthor

ro0NL commentedOct 16, 2018
edited
Loading

To further clarify, this makes thenull value explicit. It can only come from a default parameter (env(SOME): ~). A real env can never benull, so without a default, passing"" is the better assumption.

@fabpot
Copy link
Member

Thank you@ro0NL.

@fabpotfabpot merged commit38a8ab9 intosymfony:4.1Oct 17, 2018
fabpot added a commit that referenced this pull requestOct 17, 2018
…(ro0NL)This PR was squashed before being merged into the 4.1 branch (closes#28838).Discussion----------[DI] Default undefined env to empty string during compile| Q             | A| ------------- | ---| Branch?       | 4.1| Bug fix?      | yes| New feature?  | no| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| Fixed tickets |#28827| License       | MIT| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->Instead of using `null` for undefined envs, use `""` instead. We already default the type to string, so actually providing a string value makes sense. During runtime it will always be string also.Commits-------38a8ab9 [DI] Default undefined env to empty string during compile
@ro0NLro0NL deleted the env branchOctober 17, 2018 07:50
@fabpotfabpot mentioned this pull requestNov 3, 2018
nicolas-grekas added a commit that referenced this pull requestDec 1, 2018
…o0NL)This PR was squashed before being merged into the 4.3-dev branch (closes#28858).Discussion----------[DI] Deprecated using env vars with cannotBeEmpty()| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | yes-ish| New feature?  | yes| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | yes| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| Fixed tickets |#28827| License       | MIT| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->Continuation of#28838 for 4.2Using environment variables for nodes marked `cannotBeEmpty()` is semantically not possible, we'll never know the value is empty yes/no during compile time. Neither we should assume one or another.Commits-------397c19e [DI] Deprecated using env vars with cannotBeEmpty()
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@ro0NL@fabpot@nicolas-grekas@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp