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

Abort if creating an environment called "testing" #249

Conversation

luanfreitasdev
Copy link
Contributor

@luanfreitasdev luanfreitasdev commented Jan 29, 2024

This pull request notifies the user that we should avoid referring to an environment as "testing"

When calling the environment "testing", we may have problems during deployment if any code has the "app()->runningUnitTests();" check.

The problem is caused in the SetBuildEnvironment file on line 66 when doing this:

Therefore, if the user environment calls testing, vapor will add APP_ENV=testing and the deployment will fail.

I don't believe it needs to change in "SetBuildEnvironment", why the name "testing" should be abolished instead of checking the environment.

I believe we also need to document

@luanfreitasdev luanfreitasdev changed the title Abort if creating an environment called "test" Abort if creating an environment called "testing" Jan 29, 2024
@taylorotwell taylorotwell merged commit 33980da into laravel:master Jan 30, 2024
13 checks passed
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