-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Dotenv] Mention the overrideExistingVars
parameter of DotEnv
#19082
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
[Dotenv] Mention the overrideExistingVars
parameter of DotEnv
#19082
Conversation
overrideExistingVars
parameter of DotEnv
overrideExistingVars
parameter of DotEnv
use Symfony\Component\Dotenv\Dotenv; | ||
|
||
$dotenv = new Dotenv(); | ||
$dotenv->loadEnv(__DIR__.'/.env', null, 'dev', ['test'], true); |
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.
I would use named arguments here and only add the required one + the overrideExistingVars parameter
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.
Yes but 5.4 minimal req is PHP 7.2. Shouldn't the example be compatible with the lowest possible PHP version ?
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.
Oh indeed, but we can do it after upmerge
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.
I'll provide the PR 🙂
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.
See my comment
Open for a PR to adjust the PHPDoc in the code repo, like proposed by stof? |
Here you go 🙂 |
Nice contribution as always. Thanks Alex! |
…re-daubois) This PR was merged into the 5.4 branch. Discussion ---------- [Dotenv] Add PHPDoc for `$overrideExistingVars` | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Following symfony/symfony-docs#19082 (comment) Commits ------- 218a4ac [Dotent] Add PHPDoc for `$overrideExistingVars`
Related to symfony/symfony#52090
I think this is a good place to mention it, as the DotEnv component doesn't have a proper documentation page