8000 Allow injecting env vars to web server process by Pierstoval · Pull Request #51 · symfony/panther · GitHub
[go: up one dir, main page]

Skip to content

Allow injecting env vars to web server process #51

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
wants to merge 1 commit into from
Closed

Allow injecting env vars to web server process #51

wants to merge 1 commit into from

Conversation

Pierstoval
Copy link
Contributor

After I closed #18 I forgot to make another PR for this part.

I think it's essential to automatically inject env vars.

As we are using PHPUnit, env vars for the test execution should be set in phpunit.xml.dist, therefore they'll be available in $_ENV thanks to PHPUnit, so we can safely inject them in the process.

This will avoid it use the .env file when using the full-stack setup, and make sure we can isolate test env from dev env when using the same machine for both.

Copy link
Member
@dunglas dunglas left a comment

Choose a reason for hiding this comment

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

It's already handled in Symfony Process: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Process/Process.php#L1065-L1068

It's probably a config issue.

@Pierstoval
Copy link
Contributor Author

Investigating on the issue 😉

Then this PR becomes an RFC just to propose the end-user to add and/or overwrite env vars in the current web server! 😄

@dunglas
Copy link
Member
dunglas commented Sep 23, 2018

I've found the underlying issue, and I fixed the Flex recipe accordingly: symfony/recipes#464

Thank you very much for reporting this Alex!

@dunglas dunglas closed this Sep 23, 2018
@Pierstoval Pierstoval deleted the env-vars-process branch September 24, 2018 08:48
@Pierstoval
Copy link
Contributor Author
Pierstoval commented Sep 24, 2018

👍
To be honest, that's how I fixed it on my project, but I didn't took time to fix it, especially because I wish symfony/symfony#25693 could be considered OK one day 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0