-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Added small section about default values #11956
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wouterj
approved these changes
Jul 18, 2019
3imed-jaberi
approved these changes
Jul 25, 2019
symfony-splitter
pushed a commit
to symfony/dotenv
that referenced
this pull request
Aug 6, 2019
… not set (j92) This PR was squashed before being merged into the 4.4 branch (closes #31546). Discussion ---------- [Dotenv] Use default value when referenced variable is not set | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#11956 <!-- required for new features --> In bash you have the option to define a default variable like this: ```bash FOO=${VARIABLE:-default} ``` When VARIABLE is not set ```bash FOO=${VARIABLE:-default} #FOO=default ``` When VARIABLE is set: ```bash VARIABLE=test FOO=${VARIABLE:-default} #FOO=test ``` If others find this also a good idea, I will write documentation and add the Doc PR. But first I would like some feedback to check if anyone agrees with this feature. Commits ------- 790dbad149 [Dotenv] Use default value when referenced variable is not set
xabbuh
added a commit
to symfony/symfony
that referenced
this pull request
Aug 6, 2019
… not set (j92) This PR was squashed before being merged into the 4.4 branch (closes #31546). Discussion ---------- [Dotenv] Use default value when referenced variable is not set | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#11956 <!-- required for new features --> In bash you have the option to define a default variable like this: ```bash FOO=${VARIABLE:-default} ``` When VARIABLE is not set ```bash FOO=${VARIABLE:-default} #FOO=default ``` When VARIABLE is set: ```bash VARIABLE=test FOO=${VARIABLE:-default} #FOO=test ``` If others find this also a good idea, I will write documentation and add the Doc PR. But first I would like some feedback to check if anyone agrees with this feature. Commits ------- 790dbad [Dotenv] Use default value when referenced variable is not set
@j92 Thank you for implementing this feature and writing the docs for it. Can you rebase here now that the code has been merged? :) |
@xabbuh Done and thanks! |
OskarStark
approved these changes
Aug 6, 2019
Thank you, I added a versionadded directive while merging. |
OskarStark
added a commit
that referenced
this pull request
Aug 6, 2019
This PR was merged into the 4.4 branch. Discussion ---------- Added small section about default values <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Added a short description and a code sample of how to use default values when referenced variables are not set. The feature PR is symfony/symfony#31546. Commits ------- 1848e00 Added small section about default values
OskarStark
added a commit
that referenced
this pull request
Aug 6, 2019
OskarStark
added a commit
that referenced
this pull request
Aug 6, 2019
* 4.4: Add missing versionadded directive. refs #11956 Added small section about default values
OskarStark
added a commit
that referenced
this pull request
Aug 6, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a short description and a code sample of how to use default values when referenced variables are not set. The feature PR is symfony/symfony#31546.