Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Suggesting that ".env.testing" file be added to .gitignore #2659

Open
Defrothew opened this issue Jul 7, 2021 · 2 comments
Open

Suggesting that ".env.testing" file be added to .gitignore #2659

Defrothew opened this issue Jul 7, 2021 · 2 comments

Comments

@Defrothew
Copy link

No description provided.

@ahinkle
Copy link

ahinkle commented Jul 10, 2021

Most applications don't have a .env.testing. If you setup your PHPUnit configuration; you shouldn't a need for a testing env.

@michaeldyrynda
Copy link

michaeldyrynda commented Jul 10, 2021

I disagree with that. phpunit.xml is great for environment variables that you never want to change between test environments (hash rounds, etc.), but can be problematic if you do have per-developer settings for testing.

You wouldn’t want to store Stripe keys in phpunit.xml, some developers may use host-available MySQL, some might use Docker or Sail, you may want to use SQLite locally.

From memory, phpunit.xml Will take precedence over any .env file values.

That said, I think it’s sufficient to just put this in your project ignore rather than the default project template.

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

No branches or pull requests

3 participants