Skip to content

[DotEnv] Failed to parse variables from $_ENV #23423

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

Closed
brieucthomas opened this issue Jul 6, 2017 · 1 comment
Closed

[DotEnv] Failed to parse variables from $_ENV #23423

brieucthomas opened this issue Jul 6, 2017 · 1 comment

Comments

@brieucthomas
Copy link
Contributor

brieucthomas commented Jul 6, 2017

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.3.3

Hello,

I think there is an issue with the DotEnv component.

use Symfony\Component\Dotenv\Dotenv;

$_ENV['LOCAL'] = 'local';

$values = (new Dotenv())->parse('FOO=$LOCAL'));

Expected:

$values = ['FOO' => 'local'];

Actual:

$values = ['FOO' => '1'];
@brieucthomas
Copy link
Contributor Author

I will create the pull request soon.

@brieucthomas brieucthomas changed the title [DotEnv] Failed to parse variables in $_ENV [DotEnv] Failed to parse variables from $_ENV Jul 6, 2017
fabpot added a commit that referenced this issue Jul 6, 2017
This PR was merged into the 3.3 branch.

Discussion
----------

[DotEnv] Fix variable substitution

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

Commits
-------

1dfcdc7 [DotEnv] Fix variable substitution
@fabpot fabpot closed this as completed Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants