Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Add support to environment variables APP_ENV/DEBUG in KernelTestCase#24177
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
yceruto commentedSep 12, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I guess fabbot failure (unrelated) should be fixed from |
| ); | ||
| if (isset($options['environment'])) { | ||
| $env =$options['environment']; | ||
| }elseif (isset($_SERVER['APP_ENV']) ||isset($_ENV['APP_ENV'])) { |
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 think I would split this in two:
if (isset($options['environment'])) {$env =$options['environment'];}elseif (isset($_SERVER['APP_ENV'])) {$env =$_SERVER['APP_ENV'];}elseif (isset($_ENV['APP_ENV'])) {$env =$_ENV['APP_ENV'];}else {$env ='test';}
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.
Fixed.
xabbuh commentedSep 12, 2017
Should we merge this one as a bugfix into the |
yceruto commentedSep 12, 2017
As a bugfix should be into |
fabpot commentedSep 12, 2017
As env vars are "officially" supported since 3.3, I'd vote for a merge in 3.3 |
yceruto commentedSep 12, 2017
Done. |
nicolas-grekas commentedSep 13, 2017
Thank you@yceruto. |
…_ENV/DEBUG in KernelTestCase (yceruto)This PR was merged into the 3.3 branch.Discussion----------[FrameworkBundle] Add support to environment variables APP_ENV/DEBUG in KernelTestCase| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |symfony/recipes#170 (comment)| License | MIT| Doc PR | -/cc@fabpotCommits-------8d56744 Add support to environment variables APP_ENV/DEBUG in KernelTestCase
/cc@fabpot