Skip to content
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

Suggestion: Option to load a different .env file #117

Open
ThomasLandauer opened this issue Feb 21, 2021 · 0 comments
Open

Suggestion: Option to load a different .env file #117

ThomasLandauer opened this issue Feb 21, 2021 · 0 comments

Comments

@ThomasLandauer
Copy link
Member

My use case: My app uses the Symfony HTTP Client, which throws a TransportException if it can't connect: https://symfony.com/doc/current/http_client.html#handling-exceptions
And I want to assert that my app catches it correctly. So my idea: Put some bogus URL in .env.test-failing, then load it in framework.php:

'base_uri' => '%env(string:URL)%'

So something like $I->loadEnvFile('/.env.test-failing') would be great! And if that's not possible, maybe a CLI parameter --env-file=.env.test-failing?

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

No branches or pull requests

1 participant