Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DI] replace "nullable" env processor by improving the "default" one #30504

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

Merged
merged 1 commit into from
Mar 10, 2019

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Neither nullable nor default are released yet.
I propose to replace the nullable processor (see #29767) with an improved default one (from #28976).
%env(default::FOO)% now defaults to null when the env var doesn't exist or compares to false".

ping @jderusse @bpolaszek

@bpolaszek
Copy link
Contributor

But it was my 1st PR! 😥

(French contributors will remind "mais t'avais dit qu'on ferait des knacki!")

More seriously, that's a good idea 🙂 thank you @nicolas-grekas !

Copy link
Contributor

@ogizanagi ogizanagi left a comment

Choose a reason for hiding this comment

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

Great. I like this one much more :)

@nicolas-grekas
Copy link
Member Author

@jderusse @bpolaszek would you mind sending a doc PR please? (see #10722)

@jderusse
Copy link
Member

done in symfony/symfony-docs#11127

@fabpot
Copy link
Member

fabpot commented Mar 10, 2019

Thank you @nicolas-grekas.

@fabpot fabpot merged commit c50aad2 into symfony:master Mar 10, 2019
fabpot added a commit that referenced this pull request Mar 10, 2019
… "default" one (nicolas-grekas)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[DI] replace "nullable" env processor by improving the "default" one

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Neither `nullable` nor `default` are released yet.
I propose to replace the `nullable` processor (see #29767) with an improved `default` one (from #28976).
`%env(default::FOO)%` now defaults to `null` when the env var doesn't exist or compares to false".

ping @jderusse @bpolaszek

Commits
-------

c50aad2 [DI] replace "nullable" env processor by improving the "default" one
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Mar 11, 2019
…sse)

This PR was merged into the master branch.

Discussion
----------

Document Default env processor with null fallback

Document the fallback to `null`

PR: symfony/symfony#30504

Commits
-------

309bd58 Document Default env processor with null fallback
@nicolas-grekas nicolas-grekas deleted the di-env-default-proc branch March 15, 2019 13:41
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
@fabpot fabpot mentioned this pull request May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants