Skip to content

Conversation

dehbka
Copy link

@dehbka dehbka commented Feb 12, 2022

Fix issue 40978

@driesvints
Copy link
Member

Seems like #37142 is the cause here.

@driesvints driesvints linked an issue Feb 14, 2022 that may be closed by this pull request
@taylorotwell
Copy link
Member

I'd like some feedback from the original author of this check tbh. It feels weird to totally reverse a check without an explanation and understanding on why we are doing so.

@ugorur
Copy link
Contributor

ugorur commented Feb 14, 2022

I put this check because we are developed our laravel apps with docker compose file without env file. Without env file but with docker compose, artisan serve command didn't work.

@taylorotwell
Copy link
Member

Still feels like we don't (or at least I don't) have a good understanding with what we're doing here? Does anyone?

@ugorur
Copy link
Contributor

ugorur commented Feb 15, 2022

Still feels like we don't (or at least I don't) have a good understanding with what we're doing here? Does anyone?

this condition exist because if we don't have .env file, we should fill our env variables with global Environment variables. Before this control, serve command couldn't use global Environment variables

if this pr approve, we couldn't use server side environments in our laravel app so this pr shouldn't be approved.

@taylorotwell
Copy link
Member

So how do you suggest we fix #40978 @ugorur

@taylorotwell
Copy link
Member

taylorotwell commented Feb 15, 2022

I actually can't recreate the issue. Does your .env.testing file actually contain APP_ENV=testing. If not - add it - that solves the root issue for me.

@taylorotwell
Copy link
Member

Please resubmit if my solution does not work for you.

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.

Laravel 9 command serve does not use custom .env file
4 participants